← Commit list

4c9455f96

Denys Vlasenko
Denys Vlasenko
2018-12-06
SUCCESS Duration: 152s

Subject

dc: fix "dc does_not_exist" SEGVing

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

miscutils/bc.c+2 -1
@@ -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];