diff options
author | Tomasz Kondel <tomasz.kondel2@sonymobile.com> | 2013-11-05 13:17:45 +0100 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2014-11-13 18:23:34 +0000 |
commit | fca58f4b18e0066fc7829b152f0093daa51281e0 (patch) | |
tree | 04a039b708a6456bdfa3d2a9c4c7223bf382d2ad | |
parent | c325535d3de1d103d5d40c5267df9ff9325bb3e3 (diff) | |
download | system_core-fca58f4b18e0066fc7829b152f0093daa51281e0.zip system_core-fca58f4b18e0066fc7829b152f0093daa51281e0.tar.gz system_core-fca58f4b18e0066fc7829b152f0093daa51281e0.tar.bz2 |
Fix segfault in get_character_device_symlinks()
A segmentation fault will occur when strchr function returns NULL.
Change-Id: I76076acfff16056179bf24dff5df9f81d9a45125
-rw-r--r-- | init/devices.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/devices.c b/init/devices.c index 2fa5c22..a95111a 100644 --- a/init/devices.c +++ b/init/devices.c @@ -458,7 +458,7 @@ static char **get_character_device_symlinks(struct uevent *uevent) /* skip "/devices/platform/<driver>" */ parent = strchr(uevent->path + pdev->path_len, '/'); - if (!*parent) + if (!parent) goto err; if (!strncmp(parent, "/usb", 4)) { |