From a4d82a2c2c84e3856ff390219a2a4c7f9952e58a Mon Sep 17 00:00:00 2001 From: Qualys Security Advisory Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] proc/readproc.c: Harden openproc(). Replace xmalloc() with xcalloc(). --- proc/readproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc/readproc.c b/proc/readproc.c index de69cdad..03014b62 100644 --- a/proc/readproc.c +++ b/proc/readproc.c @@ -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);