proc/readproc.c: Harden openproc().

Replace xmalloc() with xcalloc().
This commit is contained in:
Qualys Security Advisory authored and Craig Small committed 2018-05-19 07:32:22 +10:00
1 parent 19849a45e0
commit a4d82a2c2c
1 file changed
+1 -1
+1 -1
View File
@@ -1413,7 +1413,7 @@ PROCTAB* openproc(int flags, ...) {
va_list ap;
struct stat sbuf;
static int did_stat;
PROCTAB* PT = xmalloc(sizeof(PROCTAB));
PROCTAB* PT = xcalloc(sizeof(PROCTAB));
if (!did_stat){
task_dir_missing = stat("/proc/self/task", &sbuf);