summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorNoah Pendleton <2538614+noahp@users.noreply.github.com>2018-11-13 08:22:25 -0500
committerNoah Pendleton <2538614+noahp@users.noreply.github.com>2018-11-13 08:22:25 -0500
commitf127ce3505e308788dd12dcda9b18dc208da1220 (patch)
tree594f8726f0178fd86fca6d250c25c21a0de139b8 /src/commit.c
parent814e7acbabc2e756f809057b7746e08839c44cde (diff)
downloadlibgit2-f127ce3505e308788dd12dcda9b18dc208da1220.tar.gz
tests: address two null argument instances
Handle two null argument cases that occur in the unit tests. One is in library code, the other is in test code. Detected by running unit tests with undefined behavior sanitizer: ```bash # build mkdir build && cd build cmake -DBUILD_CLAR=ON -DCMAKE_C_FLAGS="-fsanitize=address \ -fsanitize=undefined -fstack-usage -static-libasan" .. cmake --build . # run with asan ASAN_OPTIONS="allocator_may_return_null=1" ./libgit2_clar ... ............../libgit2/src/apply.c:316:3: runtime error: null pointer \ passed as argument 1, which is declared to never be null ...................../libgit2/tests/apply/fromfile.c:46:3: runtime \ error: null pointer passed as argument 1, which is declared to never be null ```
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions