diff options
author | David Tolnay <dtolnay@gmail.com> | 2015-06-19 10:33:35 -0700 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2015-06-20 16:08:56 -0500 |
commit | 4a316fbb5a1119ebb74b271129d563fd284315bc (patch) | |
tree | 51fed5c676c00384c34b4fcc49611a19149a8136 /jv.c | |
parent | 7811ef1e1746f0963deb960af2c9623fb53c24a5 (diff) |
fix errors flagged by clang static analyzer
builtin.c: bug - free of uninitialized jv
compile.c: missing assertion
jq_test.c: buggy logic / unreachable code
jv.c: missing assertion
jv_alloc.c: false positive - intentional read of uninitialized memory
jv_file.c: dead code
Diffstat (limited to 'jv.c')
-rw-r--r-- | jv.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -473,6 +473,7 @@ static jv jvp_string_copy_replace_bad(const char* data, uint32_t length) { /* Assumes valid UTF8 */ static jv jvp_string_new(const char* data, uint32_t length) { + assert(data); jvp_string* s = jvp_string_alloc(length); s->length_hashed = length << 1; memcpy(s->data, data, length); |