From: Florian Zumbiehl Date: Tue, 1 Sep 2009 10:15:54 +0000 (+0200) Subject: ude_rules.c: fix possible NULL pointer dereference in get_key() X-Git-Tag: 174~797 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9257ecfc191ede0029e3486fd50c85b080927d0b;p=systemd ude_rules.c: fix possible NULL pointer dereference in get_key() --- 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 */