Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tool_getparam: handle failure of curlx_convert_tchar_to_UTF8() #7023

Merged
merged 1 commit into from May 6, 2021

Conversation

@kdudka
Copy link
Collaborator

@kdudka kdudka commented May 6, 2021

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'
@bagder
bagder approved these changes May 6, 2021
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
@kdudka kdudka force-pushed the kdudka:gcc-analyzer branch from 393120b to 92953dc May 6, 2021
@kdudka
Copy link
Collaborator Author

@kdudka kdudka commented May 6, 2021

Thanks for review! Merging...

@kdudka kdudka closed this in 92953dc May 6, 2021
@kdudka kdudka merged commit 92953dc into curl:master May 6, 2021
26 of 44 checks passed
26 of 44 checks passed
@github-actions
codeql
Details
@github-actions
fuzzing
Details
@github-actions
macos normal
Details
@github-actions
macos debug
Details
@github-actions
macos libssh2
Details
@github-actions
macos c-ares
Details
@github-actions
macos HTTP only
Details
@github-actions
macos SecureTransport metalink
Details
@github-actions
macos OpenSSL metalink
Details
@github-actions
macos LibreSSL metalink
Details
@github-actions
macos torture
Details
@github-actions
macos torture-ftp
Details
@github-actions
macos macOS 10.15
Details
@github-actions
macos cmake clang OpenSSL
Details
@github-actions
macos cmake clang LibreSSL
Details
@github-actions
macos cmake gcc-8 OpenSSL
Details
@github-actions
macos cmake gcc-8 LibreSSL
Details
@github-actions
macos cmake gcc-9 OpenSSL
Details
@github-actions
macos cmake gcc-9 LibreSSL
Details
@azure-pipelines
curl.curl Build #20210506.9 failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw32_debug) windows windows msys1_mingw32_debug failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw32_debug_schannel) windows windows msys1_mingw32_debug_schannel failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw64_debug) windows windows msys1_mingw64_debug failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw64_debug_schannel) windows windows msys1_mingw64_debug_schannel failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw_debug) windows windows msys1_mingw_debug failed
Details
@azure-pipelines
curl.curl (windows windows msys1_mingw_debug_schannel) windows windows msys1_mingw_debug_schannel failed
Details
@azure-pipelines
curl.curl (windows windows msys2_mingw32_debug_openssl) windows windows msys2_mingw32_debug_openssl failed
Details
@azure-pipelines
curl.curl (windows windows msys2_mingw32_debug_schannel) windows windows msys2_mingw32_debug_schannel failed
Details
@azure-pipelines
curl.curl (windows windows msys2_mingw64_debug_openssl) windows windows msys2_mingw64_debug_openssl failed
Details
@azure-pipelines
curl.curl (windows windows msys2_mingw64_debug_schannel) windows windows msys2_mingw64_debug_schannel failed
Details
@cirrus-ci
FreeBSD freebsd_instance:family/freebsd-11-4 Task Summary
Details
@cirrus-ci
FreeBSD freebsd_instance:family/freebsd-12-2 Task Summary
Details
@lgtm-com
LGTM analysis: C/C++ Fetching git commits
Details
@lgtm-com
LGTM analysis: Python Fetching git commits
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@sonatype-lift
musedev Analyzing. Musebot needs a minute
Details
@azure-pipelines
curl.curl (linux ubuntu default) linux ubuntu default succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu disable_http_smtp_imap) linux ubuntu disable_http_smtp_imap succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu disable_ipv6) linux ubuntu disable_ipv6 succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu disable_thredres) linux ubuntu disable_thredres succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu https_only) linux ubuntu https_only succeeded
Details
@azure-pipelines
curl.curl (linux ubuntu torture) linux ubuntu torture succeeded
Details
@deepcode-ci-bot
deepcode-ci-bot Well done, no issues found!
Details
@kdudka kdudka deleted the kdudka:gcc-analyzer branch May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants