From 040585f20b57d812a6a67a59fa5fa4ddf88df554 Mon Sep 17 00:00:00 2001 From: Thomas Kowalski Date: Sat, 18 Apr 2026 16:33:51 -0400 Subject: [PATCH] fix: check unpack_callback_uint32 result --- msgpack/unpack_container_header.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/msgpack/unpack_container_header.h b/msgpack/unpack_container_header.h index c14a3c2b..e48d43ba 100644 --- a/msgpack/unpack_container_header.h +++ b/msgpack/unpack_container_header.h @@ -45,7 +45,10 @@ static inline int unpack_container_header(unpack_context* ctx, const char* data, PyErr_SetString(PyExc_ValueError, "Unexpected type header on stream"); return -1; } - unpack_callback_uint32(&ctx->user, size, &ctx->stack[0].obj); + + if (unpack_callback_uint32(&ctx->user, size, &ctx->stack[0].obj) < 0) + return -1; + return 1; }