Package: sysinfo / 0.7-8

12-fix-nre-no-bogomips.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
From: Douglas Mencken <dougmencken@gmail.com>
Reviewed-By: Chow Loong Jin <hyperair@debian.org>
Description: Fix NRE when /proc/cpuinfo has no bogomips
Bugs-Debian: http://bugs.debian.org/654210
Index: sysinfo/Sysinfo/CpuInfo.cs
===================================================================
--- sysinfo.orig/Sysinfo/CpuInfo.cs	2012-01-11 01:43:58.652934535 +0800
+++ sysinfo/Sysinfo/CpuInfo.cs	2012-01-11 02:01:40.029866402 +0800
@@ -94,6 +94,9 @@
 					while ( dynamicB ) {
 						
 						temp = textread.ReadLine();
+
+						if (temp == null)
+							break;
 						
 						//frequency
 						if ( temp.StartsWith("cpu MHz"))