svn commit: r240655 - head/sys/boot/ofw/libofw
Alexander Motin
mav at FreeBSD.org
Tue Sep 18 15:38:43 UTC 2012
Author: mav
Date: Tue Sep 18 15:38:42 2012
New Revision: 240655
URL: http://svn.freebsd.org/changeset/base/240655
Log:
Fix panics on attempt to dereference uninitizlized pointer, returned via
'path' argument of ofw_parsedev() if devspec refers raw device with no path.
For example, `ls /pci at 1f,0/ide at d/disk at 0,0:a/` works fine, while
`ls /pci at 1f,0/ide at d/disk at 0,0:a` panicked before this change.
Modified:
head/sys/boot/ofw/libofw/devicename.c
Modified: head/sys/boot/ofw/libofw/devicename.c
==============================================================================
--- head/sys/boot/ofw/libofw/devicename.c Tue Sep 18 14:33:27 2012 (r240654)
+++ head/sys/boot/ofw/libofw/devicename.c Tue Sep 18 15:38:42 2012 (r240655)
@@ -105,7 +105,7 @@ ofw_parsedev(struct ofw_devdesc **dev, c
return(ENOENT);
found:
- if (path != NULL && *s != '\0')
+ if (path != NULL)
*path = s;
idev = malloc(sizeof(struct ofw_devdesc));
if (idev == NULL) {
More information about the svn-src-head
mailing list