Skip to content

Commit

Permalink
ieee1394: fix NULL pointer dereference in sysfs access
Browse files Browse the repository at this point in the history
Regression since "ieee1394: prevent device binding of raw1394,
video1394, dv1394", commit d2ace29:
$ cat /sys/bus/ieee1394/drivers/raw1394/device_ids
triggers a NULL pointer dereference in fw_show_drv_device_ids.
Reported by Miles Lane.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Miles Lane <miles.lane@gmail.com>
  • Loading branch information
Stefan Richter committed May 1, 2008
1 parent e386497 commit 07c7224
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/ieee1394/nodemgr.c
Expand Up @@ -520,8 +520,11 @@ static ssize_t fw_show_drv_device_ids(struct device_driver *drv, char *buf)
char *scratch = buf;

driver = container_of(drv, struct hpsb_protocol_driver, driver);
id = driver->id_table;
if (!id)
return 0;

for (id = driver->id_table; id->match_flags != 0; id++) {
for (; id->match_flags != 0; id++) {
int need_coma = 0;

if (id->match_flags & IEEE1394_MATCH_VENDOR_ID) {
Expand Down

0 comments on commit 07c7224

Please sign in to comment.