cborattr: fixes missing error handling
In the while loop in the function cbor_internal_read_object
there is no error handling when the cbor_value_advance
reports an error. This may end up in a never ending loop.
Signed-off-by: Even Falch-Larsen <even.falch.larsen@nomono.co>
diff --git a/cborattr/src/cborattr.c b/cborattr/src/cborattr.c
index e5177d6..ea68661 100644
--- a/cborattr/src/cborattr.c
+++ b/cborattr/src/cborattr.c
@@ -306,7 +306,7 @@
err |= CborErrorIllegalType;
}
}
- cbor_value_advance(&cur_value);
+ err = cbor_value_advance(&cur_value);
}
if (!err) {
/* that should be it for this container */