bsnmpget: initialise the suboption value in getsubopt1()

Otherwise, "bsnmpget -o verbose -I cut" crashes.

Reported by:	clang static analyzer
MFC after:	2 weeks
This commit is contained in:
Maxim Konovalov committed 2026-09-22 22:56:28 +00:00
1 parent 74cab6e237
commit 5d169b5365
1 file changed
+1
@@ -316,6 +316,7 @@ getsubopt1(char **arg, const char *const *options, char **valp, char **optp)
char *ptr;
*optp = NULL;
*valp = NULL;
/* Skip leading junk. */
for (ptr = *arg; *ptr != '\0'; ptr++)