projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52c2105
)
dc: fix "dc does_not_exist" SEGVing
author
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 6 Dec 2018 14:21:39 +0000
(15:21 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Thu, 6 Dec 2018 14:21:39 +0000
(15:21 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c
patch
|
blob
|
history
diff --git
a/miscutils/bc.c
b/miscutils/bc.c
index 3d53db77815666f8b5431ec2bfad01a5cc2b2605..0200afca27d8ccec79176351c1e955756666f796 100644
(file)
--- a/
miscutils/bc.c
+++ b/
miscutils/bc.c
@@
-1322,7
+1322,8
@@
static char* bc_read_file(const char *path)
size_t size = ((size_t) -1);
size_t i;
- buf = xmalloc_open_read_close(path, &size);
+ // Never returns NULL (dies on errors)
+ buf = xmalloc_xopen_read_close(path, &size);
for (i = 0; i < size; ++i) {
char c = buf[i];