Scan-Build Cleaning

1. The portfwd example had a couple spots in command line option
   processing where atol could get called with a null pointer.
pull/445/head
John Safranek 2022-08-29 17:13:12 -07:00
parent 76417aca88
commit 79ddd784c7
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
1 changed files with 4 additions and 0 deletions

View File

@ -267,6 +267,8 @@ THREAD_RETURN WOLFSSH_THREAD portfwd_worker(void* args)
break;
case 'f':
if (myoptarg == NULL)
err_sys("null argument found");
fwdFromPort = (word16)atoi(myoptarg);
break;
@ -281,6 +283,8 @@ THREAD_RETURN WOLFSSH_THREAD portfwd_worker(void* args)
break;
case 't':
if (myoptarg == NULL)
err_sys("null argument found");
fwdToPort = (word16)atoi(myoptarg);
break;