OSDN Git Service
(root)
/
lha
/
lha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* huf.c (alloc_buf): call fatal_error() when memory allocation failed
[lha/lha.git]
/
src
/
huf.c
diff --git
a/src/huf.c
b/src/huf.c
index
8004083
..
cc1bde4
100644
(file)
--- a/
src/huf.c
+++ b/
src/huf.c
@@
-262,7
+262,7
@@
alloc_buf( /* void */ )
while ((buf = (unsigned char *) malloc(bufsiz)) == NULL) {
bufsiz = (bufsiz / 10) * 9;
if (bufsiz < 4 * 1024)
while ((buf = (unsigned char *) malloc(bufsiz)) == NULL) {
bufsiz = (bufsiz / 10) * 9;
if (bufsiz < 4 * 1024)
-
break
;
+
fatal_error("Not enough memory")
;
}
return buf;
}
}
return buf;
}