From: Peter Hutterer Date: Tue, 18 Jul 2023 06:04:51 +0000 (+1000) Subject: Fix a gcc analyzer complaint X-Git-Tag: 1.24.0~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ebb6f629f2bc1a1392eae09d2e0a2be9a54046e;p=platform%2Fupstream%2Flibinput.git Fix a gcc analyzer complaint Doesn't trigger here since we never call it with NULL but let's make sure anyway. Signed-off-by: Peter Hutterer --- diff --git a/src/util-prop-parsers.c b/src/util-prop-parsers.c index 47ba3b51..2fe1b1fb 100644 --- a/src/util-prop-parsers.c +++ b/src/util-prop-parsers.c @@ -506,7 +506,7 @@ parse_evdev_abs_prop(const char *prop, struct input_absinfo *abs) /* basic sanity check: 5 digits for min/max, 3 for resolution, fuzz, * flat and the colons. That's plenty, anything over is garbage */ - if (strlen(prop) > 24) + if (!prop || strlen(prop) > 24) goto out; current = str;