From 9257ecfc191ede0029e3486fd50c85b080927d0b Mon Sep 17 00:00:00 2001 From: Florian Zumbiehl Date: Tue, 1 Sep 2009 12:15:54 +0200 Subject: [PATCH] ude_rules.c: fix possible NULL pointer dereference in get_key() --- udev/udev-rules.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev/udev-rules.c b/udev/udev-rules.c index a45a8138..96645e8f 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 */ -- 2.39.5