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
This commit is contained in:
1 parent
7811ef1e17
commit
4a316fbb5a
6 files changed
+12
-9
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user