| 1 | Combined diffs of commits https://github.com/pantoniou/libfyaml/commit/0982fcefc6a16d4c8cb5b06747d3fc8e630de3ae.diff and https://github.com/pantoniou/libfyaml/commit/9192deaac095f9881cc1e5756dede683f36b09d6.diff.
|
| 2 |
|
| 3 | Upstream-status: <https://github.com/pantoniou/libfyaml/issues/328>
|
| 4 |
|
| 5 | diff --git a/include/libfyaml/libfyaml-vlsize.h b/include/libfyaml/libfyaml-vlsize.h
|
| 6 | index 6ccb7ab1..1b950c4c 100644
|
| 7 | |
| 8 | |
| 9 | @@ -816,5 +816,5 @@ fy_decode_size_nocheck(const uint8_t *start, size_t *sizep)
|
| 10 | static inline const uint8_t *
|
| 11 | fy_skip_size(const uint8_t *start, size_t bufsz)
|
| 12 | {
|
| 13 | - return fy_skip_size32(start, bufsz, &sz);
|
| 14 | + return fy_skip_size32(start, bufsz);
|
| 15 | }
|
| 16 |
|
| 17 | static inline const uint8_t *
|
| 18 |
|
| 19 | diff --git a/include/libfyaml/libfyaml-vlsize.h b/include/libfyaml/libfyaml-vlsize.h
|
| 20 | index 1b950c4c..acfd78d3 100644
|
| 21 | |
| 22 | |
| 23 | @@ -810,5 +810,10 @@ fy_decode_size(const uint8_t *start, size_t bufsz, size_t *sizep)
|
| 24 | static inline const uint8_t *
|
| 25 | fy_decode_size_nocheck(const uint8_t *start, size_t *sizep)
|
| 26 | {
|
| 27 | - return fy_decode_size32_nocheck(start, sizep);
|
| 28 | + uint64_t sz;
|
| 29 | + const uint8_t *ret;
|
| 30 | +
|
| 31 | + ret = fy_decode_size32_nocheck(start, &sz);
|
| 32 | + *sizep = (size_t)sz;
|
| 33 | + return ret;
|
| 34 | }
|
| 35 |
|
| 36 | static inline const uint8_t *
|