Skip to content

Commit 89b3fd3

Browse files
committed
Fixed uninitialized local pointer variable 'res'
1 parent 6ec333a commit 89b3fd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cbor.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ cbor_item_t *cbor_load(cbor_data source, size_t source_size,
115115
}
116116

117117
static cbor_item_t *_cbor_copy_int(cbor_item_t *item, bool negative) {
118-
cbor_item_t *res;
118+
cbor_item_t *res = NULL;
119119
switch (cbor_int_get_width(item)) {
120120
case CBOR_INT_8:
121121
res = cbor_build_uint8(cbor_get_uint8(item));

0 commit comments

Comments
 (0)