diff options
author | Petr Štetiar <ynezz@true.cz> | 2019-11-05 00:39:46 +0100 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-11-14 17:11:34 +0100 |
commit | 9cf978bc79641691f0c603c71fcfa98c1626ce59 (patch) | |
tree | 471599e11f11bbf9a50163cef956a55f5fb30f20 /delta.c | |
parent | 7736f497d2d9a43cd36526c8d8a12718eff2e6c7 (diff) | |
download | uci-9cf978bc79641691f0c603c71fcfa98c1626ce59.tar.gz |
delta: prevent possible null pointer use
scan-build from clang version 9 has reported following issue:
delta.c:39:13: warning: Null pointer passed to 1st parameter expecting 'nonnull'
int size = strlen(section) + 1;
^~~~~~~~~~~~~~~
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Diffstat (limited to 'delta.c')
-rw-r--r-- | delta.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -392,7 +392,7 @@ static void uci_filter_delta(struct uci_context *ctx, const char *name, const ch match = false; } - if (!match) { + if (!match && ptr.section) { uci_add_delta(ctx, &list, c, ptr.section, ptr.option, ptr.value); } |