mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
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:
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++)
|
||||
|
||||
Reference in new issue
Block a user