Apply patch from Benoît Dejean <bnet@ifrance.com> to fix overflow issues
2003-12-23 Bastien Nocera <hadess@hadess.net> * cpu.c: (glibtop_get_cpu_s): * glibtop_server.h: * loadavg.c: (glibtop_get_loadavg_s): * mem.c: (glibtop_get_mem_s): * netload.c: (glibtop_get_netload_s): * prockernel.c: (glibtop_get_proc_kernel_s): * procmem.c: (glibtop_get_proc_mem_s): * procsegment.c: (glibtop_get_proc_segment_s): * procsignal.c: (glibtop_get_proc_signal_s): * proctime.c: (glibtop_get_proc_time_s): * procuid.c: (glibtop_get_proc_uid_s): * swap.c: (glibtop_get_swap_s): Apply patch from Benoît Dejean <bnet@ifrance.com> to fix overflow issues using strtol (Closes: #129881)
This commit is contained in:
committed by
Bastien Nocera
parent
84962b2301
commit
9968f74a05
@@ -87,9 +87,9 @@ glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
|
||||
|
||||
p = skip_multiple_token (p, 23);
|
||||
|
||||
buf->start_code = strtoul (p, &p, 0);
|
||||
buf->end_code = strtoul (p, &p, 0);
|
||||
buf->start_stack = strtoul (p, &p, 0);
|
||||
buf->start_code = strtoull (p, &p, 0);
|
||||
buf->end_code = strtoull (p, &p, 0);
|
||||
buf->start_stack = strtoull (p, &p, 0);
|
||||
|
||||
buf->flags = _glibtop_sysdeps_proc_segment;
|
||||
|
||||
@@ -101,10 +101,10 @@ glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
|
||||
/* This doesn't work very well due to a bug in the Linux kernel.
|
||||
* I'll submit a patch to the kernel mailing list soon. */
|
||||
|
||||
buf->text_rss = strtoul (p, &p, 0);
|
||||
buf->shlib_rss = strtoul (p, &p, 0);
|
||||
buf->data_rss = strtoul (p, &p, 0);
|
||||
buf->dirty_size = strtoul (p, &p, 0);
|
||||
buf->text_rss = strtoull (p, &p, 0);
|
||||
buf->shlib_rss = strtoull (p, &p, 0);
|
||||
buf->data_rss = strtoull (p, &p, 0);
|
||||
buf->dirty_size = strtoull (p, &p, 0);
|
||||
|
||||
buf->text_rss <<= pageshift;
|
||||
buf->shlib_rss <<= pageshift;
|
||||
|
Reference in New Issue
Block a user