File: 40_bts-441378_fix_buffer_length.patch

package info (click to toggle)
xsysinfo 1.7-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 264 kB
  • sloc: ansic: 2,152; makefile: 17
file content (16 lines) | stat: -rw-r--r-- 454 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From: Sandro Tosi <matrixhasu@gmail.com>
Subject: BTS 441378, increase the buffer length

--- a/sysinfo.c
+++ b/sysinfo.c
@@ -34,7 +34,9 @@
 static int loadavg_fd;
 static int swaps_fd;
 
-static char buffer[1024];
+// Sandro Tosi, 2008-01-21
+// Size 16k, it must be bigger then any of /proc/{meminfo,loadavg,stat}
+static char buffer[16384];
 
 /* reread rewritten by Ernst Kloppenburg <kloppen@isr.uni-stuttgart.de> */
 /* Now works with Linux 2.2 */