X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Fos_load.c;h=e54147ff4ed2c5045898a2cffc91dea7dcaec855;hb=555214089c7045298f23fea9e060ea931804e75f;hp=f7b5dff96c96dfd7dd3297ce2f12c53ba74b3d77;hpb=ab830296816a2d91f54c275b634928f4d4cf5519;p=oweals%2Fgnunet.git diff --git a/src/util/os_load.c b/src/util/os_load.c index f7b5dff96..e54147ff4 100644 --- a/src/util/os_load.c +++ b/src/util/os_load.c @@ -156,9 +156,10 @@ updateUsage () unsigned long long usage_time = 0, total_time = 1; /* Get the first line with the data */ + memset (line, 0, sizeof (line)); rewind (proc_stat); fflush (proc_stat); - if (NULL == fgets (line, 256, proc_stat)) + if (NULL == fgets (line, sizeof (line), proc_stat)) { GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,