]> sigrok.org Git - sigrok-cli.git/commit
parsers: avoid NULL dereference when option strings are empty
authorGerhard Sittig <redacted>
Tue, 30 Aug 2022 22:40:37 +0000 (00:40 +0200)
committerGerhard Sittig <redacted>
Tue, 30 Aug 2022 23:16:19 +0000 (01:16 +0200)
commitaf9fa8c5ea9925cb8fe076ae7d4e996836a6db13
treeeb30ce33454996de9f4f26c5d0e6f2e8e5f15827
parent99595de1452934951c0d8311cf5dceef897f9860
parsers: avoid NULL dereference when option strings are empty

When colon separated options are scanned (like "-P ps2: --show") then
the empty list item which results from the trailing colon resulted in
key/value pairs becoming NULL. Handle that situation, skip empty list
elements.

Reported-By: Peter Mortensen via IRC
parsers.c