summaryrefslogtreecommitdiff
path: root/msgpack/unpack_template.h
diff options
context:
space:
mode:
authorAlexei Romanoff <drednout.by@gmail.com>2012-10-12 13:19:53 +0300
committerAlexei Romanoff <drednout.by@gmail.com>2012-10-12 13:19:53 +0300
commitcf89f18be7614d6d55bb9eb7e9bf0e10d42a8508 (patch)
treee8896d1a6e740edd28551c6f0320f356b58c512e /msgpack/unpack_template.h
parent4ea952f39dc5ff1231f780252d8d4efb16b2be3b (diff)
downloadmsgpack-python-cf89f18be7614d6d55bb9eb7e9bf0e10d42a8508.tar.gz
segfault fixed when data is unpacked using `list_hook`,
this bug is a twin to #28. Unit-test is also attached.
Diffstat (limited to 'msgpack/unpack_template.h')
-rw-r--r--msgpack/unpack_template.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/msgpack/unpack_template.h b/msgpack/unpack_template.h
index 9d13062..8a57f0d 100644
--- a/msgpack/unpack_template.h
+++ b/msgpack/unpack_template.h
@@ -347,7 +347,7 @@ _push:
if(construct_cb(_array_item)(user, c->count, &c->obj, obj) < 0) { goto _failed; }
if(++c->count == c->size) {
obj = c->obj;
- construct_cb(_array_end)(user, &obj);
+ if (construct_cb(_array_end)(user, &obj) < 0) { goto _failed; }
--top;
/*printf("stack pop %d\n", top);*/
goto _push;