fix for
Possible null pointer dereference
@@ -331,6 +331,7 @@ get_tagged_value:
*err |= CborErrorIllegalType;
return;
} else {
+ if (*prev) != 0 {
(*prev)->next = _alloc_rep();
if ((*prev)->next == NULL) {
*err = CborErrorOutOfMemory;
@@ -338,6 +339,11 @@ get_tagged_value:
}
prev = &(*prev)->next;
}
+ else {
+ *err = CborErrorOutOfMemory;
+ return;
+ }
+ }
(*prev)->type = OC_REP_OBJECT;
(*prev)->next = 0;
oc_rep_t **obj = &(*prev)->value.object;
