Commit 3369dd1
committed
Make sure we return the OOM error condition when closing containers
Usually, if you ignore the OOM error, the encoder API may start
returning success, even though no buffer overrun happens. The way to
check if an OOM happened is with cbor_encoder_get_extra_bytes_needed,
which will return non-zero if a larger buffer is returned.
That said, the API was mostly already returning the OOM error
consistently, due to almost everything ending up calling
append_to_buffer(). This case was an exception.
Signed-off-by: Thiago Macieira <thiago.macieira@intel.com>1 parent 85c9f81 commit 3369dd1
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
| 537 | + | |
| 538 | + | |
537 | 539 | | |
538 | 540 | | |
539 | 541 | | |
| |||
0 commit comments