From ecb8958e297e1659fb4cb5c93d07e3f3f86d9e18 Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Wed, 3 Feb 2016 12:40:15 +0000 Subject: [PATCH] [proc] Fix potential buffer overflow --- mono/utils/mono-proclib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mono/utils/mono-proclib.c b/mono/utils/mono-proclib.c index c4e20e4ed42..9bf6ca52ae0 100644 --- a/mono/utils/mono-proclib.c +++ b/mono/utils/mono-proclib.c @@ -187,7 +187,7 @@ get_pid_status_item_buf (int pid, const char *item, char *rbuf, int blen, MonoPr *error = MONO_PROCESS_ERROR_NOT_FOUND; return NULL; } - while ((s = fgets (buf, blen, f))) { + while ((s = fgets (buf, sizeof (buf), f))) { if (*item != *buf) continue; if (strncmp (buf, item, len)) -- 2.25.1