Skip to content

tool_parsecfg.c:223:30: runtime error: load of value 9, which is not a valid value for type '_Bool' #1728

@geeknik

Description

@geeknik

I did this

Compiled with UBSan, ASan and afl-clang-fast.

UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1 ~/curl/src/curl -K test029 file:///dev/shm/test.png

Note: /dev/shm/test.png does not exist.

I did not expect the following

tool_parsecfg.c:223:30: runtime error: load of value 9, which is not a valid value for type '_Bool'
    #0 0x5566d5 in parseconfig /root/curl/src/tool_parsecfg.c:223:30
    #1 0x511d9d in getparameter /root/curl/src/tool_getparam.c:1697:10
    #2 0x5288de in parse_args /root/curl/src/tool_getparam.c:2096:18
    #3 0x530015 in operate /root/curl/src/tool_operate.c:2018:26
    #4 0x52d4f9 in main /root/curl/src/tool_main.c:252:14
    #5 0x7f9a51481b44 in __libc_start_main /build/glibc-6V9RKT/glibc-2.19/csu/libc-start.c:287
    #6 0x42123b in _start (/root/curl/src/curl+0x42123b)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior tool_parsecfg.c:223:30 

curl/libcurl version

git 7093488

operating system

debian 8 x64

test029.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions