]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_getparam: handle failure of curlx_convert_tchar_to_UTF8() 7023/head
authorKamil Dudka <kdudka@redhat.com>
Thu, 6 May 2021 12:26:58 +0000 (14:26 +0200)
committerKamil Dudka <kdudka@redhat.com>
Thu, 6 May 2021 13:52:09 +0000 (15:52 +0200)
commit92953dc38782273171ac5bc9f32fe715df4778fb
treee9b71e67463e85bf202513963070d420d75a49a4
parentf4dc08abf268669842de938abe2fd05f878b12da
tool_getparam: handle failure of curlx_convert_tchar_to_UTF8()

Reported by GCC analyzer:

Error: GCC_ANALYZER_WARNING (CWE-476):
src/tool_getparam.c: scope_hint: In function 'parse_args'
src/tool_getparam.c:2318:38: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'orig_opt'
lib/curlx.h:56: included_from: Included from here.
src/tool_getparam.c:28: included_from: Included from here.
lib/curl_multibyte.h:70:51: note: in definition of macro 'curlx_convert_tchar_to_UTF8'
src/tool_getparam.c:2316:16: note: in expansion of macro 'curlx_convert_tchar_to_UTF8'

Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Closes #7023
src/tool_getparam.c