From: Denys Vlasenko Date: Thu, 6 Dec 2018 14:21:39 +0000 (+0100) Subject: dc: fix "dc does_not_exist" SEGVing X-Git-Tag: 1_30_0~268 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4c9455f967e21d30db0de2e13b6e1115ab8f36ce;p=oweals%2Fbusybox.git dc: fix "dc does_not_exist" SEGVing Signed-off-by: Denys Vlasenko --- diff --git a/miscutils/bc.c b/miscutils/bc.c index 3d53db778..0200afca2 100644 --- 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];