From 0f806d5a5a32f6f9b7e1b3748e561f505ffa0f64 Mon Sep 17 00:00:00 2001 From: Florian Rivoal Date: Wed, 13 Oct 2010 09:26:44 +0900 Subject: [PATCH] Fix buffer overflow Apply the patch from bug 6026, correcting a typo that causes overflows. --- panel-plugin/wormulon/linux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panel-plugin/wormulon/linux.c b/panel-plugin/wormulon/linux.c index e45ff7f..2a8f27f 100644 --- a/panel-plugin/wormulon/linux.c +++ b/panel-plugin/wormulon/linux.c @@ -101,11 +101,11 @@ int get_stat(netdata* data) /* do not parse the first two lines as they only contain static garbage */ fseek(proc_net_dev, 0, SEEK_SET); - fgets(buffer, BUFSIZ-1, proc_net_dev); - fgets(buffer, BUFSIZ-1, proc_net_dev); + fgets(buffer, BUFSIZE-1, proc_net_dev); + fgets(buffer, BUFSIZE-1, proc_net_dev); interfacefound = 0; - while (fgets(buffer, BUFSIZ-1, proc_net_dev) != NULL) + while (fgets(buffer, BUFSIZE-1, proc_net_dev) != NULL) { /* find the device name and substitute ':' with '\0' */ ptr = buffer;