Undefined behavior in byte_cursor_limit_tests #466
Labels
bug
This issue is a bug.
needs-review
This issue or pull request needs review from a core team member.
p2
This is a standard priority issue
At
aws-c-common/tests/cursor_test.c
Line 233 in c27fcc8
in
byte_cursor_limit_tests
,aws_byte_buf_write
is called afteraws_byte_buf_clean_up(&buffer)
(which I assume is intentional). This results in a call tomemcpy
withNULL
pointer and a length of zero. This appears to be undefined behavior (see https://en.cppreference.com/w/c/string/byte/memcpy), and results in the test failing if I run it under clang's ubsan.The text was updated successfully, but these errors were encountered: