]> git.ipfire.org Git - thirdparty/curl.git/commit
setopt: Address undefined behaviour by checking for null
authorJames Keast <jkeast@blackberry.com>
Fri, 10 Feb 2023 19:24:15 +0000 (15:24 -0400)
committerDan Fandrich <dan@coneharvesters.com>
Sat, 11 Feb 2023 18:13:38 +0000 (10:13 -0800)
commit635bf5a6b2f5ff87095f4350cea6f6f4e192d14f
treef9f01966fd9e4737993068cbd40402ce343876a2
parent38262c944d9c86594e3915ab3a7a5e17db6107f0
setopt: Address undefined behaviour by checking for null

This addresses undefined behaviour found using clang's UBsan:

curl/lib/setopt.c:177:14: runtime error: applying non-zero offset 1 to null pointer
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior curl/lib/setopt.c:177:14 in

Closes #10472
lib/setopt.c