summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorFlorian Zumbiehl <florz@florz.de>2009-09-01 12:15:54 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-09-01 12:15:54 +0200
commit9257ecfc191ede0029e3486fd50c85b080927d0b (patch)
tree93004db6de18f2cfdc2a1682604d042b44b58392 /udev
parent069eab7c96532ab32ce62293f88b10aa8fd41a02 (diff)
ude_rules.c: fix possible NULL pointer dereference in get_key()
Diffstat (limited to 'udev')
-rw-r--r--udev/udev-rules.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c
index a45a8138f5..96645e8f02 100644
--- a/udev/udev-rules.c
+++ b/udev/udev-rules.c
@@ -878,7 +878,7 @@ static int get_key(struct udev *udev, char **line, char **key, enum operation_ty
char *temp;
linepos = *line;
- if (linepos == NULL && linepos[0] == '\0')
+ if (linepos == NULL || linepos[0] == '\0')
return -1;
/* skip whitespace */