Skip to content

Commit 5142b3d

Browse files
fix: check return code in unpack_callback_int64
1 parent 6357bc2 commit 5142b3d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

msgpack/unpack.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ static inline int unpack_callback_int64(unpack_user* u, int64_t d, msgpack_unpac
109109
} else {
110110
p = PyLong_FromLong((long)d);
111111
}
112+
if (!p)
113+
return -1;
112114
*o = p;
113115
return 0;
114116
}

0 commit comments

Comments
 (0)