rpms/gnome-system-monitor/F-12 sysinfo.patch,1.1,1.2

Matthias Clasen mclasen at fedoraproject.org
Wed Nov 4 04:11:31 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/gnome-system-monitor/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20008

Modified Files:
	sysinfo.patch 
Log Message:
Make it crash-proof


sysinfo.patch:
 sysinfo.cpp |   27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

Index: sysinfo.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-system-monitor/F-12/sysinfo.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sysinfo.patch	4 Nov 2009 04:01:12 -0000	1.1
+++ sysinfo.patch	4 Nov 2009 04:11:31 -0000	1.2
@@ -1,6 +1,6 @@
 --- gnome-system-monitor-2.28.0/src/sysinfo.cpp	2009-07-13 07:02:39.000000000 -0400
-+++ hacked/src/sysinfo.cpp	2009-11-03 22:57:40.812784384 -0500
-@@ -220,6 +220,29 @@
++++ hacked/src/sysinfo.cpp	2009-11-03 23:07:59.791034958 -0500
+@@ -220,6 +220,31 @@
      }
    };
  
@@ -20,17 +20,19 @@
 +
 +      if (input) {
 +	std::getline(input, this->distro_release);
-+        size_t n = this->distro_release.find ("release");
 +        this->distro_name = this->distro_release;
-+        this->distro_name.erase (n - 1);
-+        this->distro_release.erase (0, n + strlen ("release") + 1);
++        size_t n = this->distro_release.find (" release ");
++        if (n != (size_t)-1) {
++          this->distro_name.erase (n);
++          this->distro_release.erase (0, n + strlen (" release "));
++        }
 +      }
 +    }
 +  };
  
    class LSBSysInfo
      : public SysInfo
-@@ -400,7 +423,7 @@
+@@ -400,7 +425,7 @@
        return new NetBSDSysInfo;
      }
  




More information about the fedora-extras-commits mailing list