public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-apps/pciutils/files: pciutils-3.1.0-null-ptr.patch
@ 2009-01-29 18:57 Mike Frysinger (vapier)
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2009-01-29 18:57 UTC (permalink / raw
  To: gentoo-commits

vapier      09/01/29 18:57:17

  Added:                pciutils-3.1.0-null-ptr.patch
  Log:
  Add fix by Andreas Wiese for NULL ptr deref #256464.
  (Portage version: 2.2_rc23/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  sys-apps/pciutils/files/pciutils-3.1.0-null-ptr.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/pciutils/files/pciutils-3.1.0-null-ptr.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/pciutils/files/pciutils-3.1.0-null-ptr.patch?rev=1.1&content-type=text/plain

Index: pciutils-3.1.0-null-ptr.patch
===================================================================
http://bugs.gentoo.org/256464

if "f" is NULL, dont try to deref it

patch by Andreas Wiese

--- a/setpci.c
+++ b/setpci.c
@@ -630,13 +630,13 @@
       e = strchr(value, ',');
       if (e)
 	*e++ = 0;
-      if (parse_x32(value, &f, &ll) < 0 || *f && *f != ':')
+      if (parse_x32(value, &f, &ll) < 0 || f && *f != ':')
 	parse_err("Invalid value \"%s\"", value);
       lim = max_values[op->width];
       if (ll > lim && ll < ~0UL - lim)
 	parse_err("Value \"%s\" is out of range", value);
       op->values[j].value = ll;
-      if (*f == ':')
+      if (f && *f == ':')
 	{
 	  if (parse_x32(f+1, NULL, &ll) <= 0)
 	    parse_err("Invalid mask \"%s\"", f+1);






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-01-29 18:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-29 18:57 [gentoo-commits] gentoo-x86 commit in sys-apps/pciutils/files: pciutils-3.1.0-null-ptr.patch Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox