X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=libmsgpack%2Fmsgpack.c;fp=libmsgpack%2Fmsgpack.c;h=f3eca64a654cd5cfcfcc9cfabdaf5fca387e5f46;hb=8b914423d8af8805685f6114888f3bbd3b528d0f;hp=0803bc657646b49f4dcbc7c3ffad244a0ec33a44;hpb=a40716088ab08fa708b2b2ba5024c3c62eee8805;p=deliverable%2Flttng-ust.git diff --git a/libmsgpack/msgpack.c b/libmsgpack/msgpack.c index 0803bc65..f3eca64a 100644 --- a/libmsgpack/msgpack.c +++ b/libmsgpack/msgpack.c @@ -316,7 +316,7 @@ int lttng_msgpack_begin_map(struct lttng_msgpack_writer *writer, size_t count) { int ret; - if (count < 0 || count >= (1 << 16)) { + if (count >= (1 << 16)) { ret = -1; goto end; } @@ -343,7 +343,7 @@ int lttng_msgpack_begin_array( { int ret; - if (count < 0 || count >= (1 << 16)) { + if (count >= (1 << 16)) { ret = -1; goto end; } @@ -370,7 +370,8 @@ int lttng_msgpack_write_str(struct lttng_msgpack_writer *writer, { int ret; size_t length = strlen(str); - if (length < 0 || length >= (1 << 16)) { + + if (length >= (1 << 16)) { ret = -1; goto end; }