From: Jaroslav Kysela Date: Mon, 23 May 2016 19:07:48 +0000 (+0200) Subject: htsmsg binary: coverity - int / uint_fast32 conversion X-Git-Tag: v4.2.1~488 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e687adfe6dd13b067c1458a55002f2cf44ff74b2;p=thirdparty%2Ftvheadend.git htsmsg binary: coverity - int / uint_fast32 conversion --- diff --git a/src/htsmsg_binary.c b/src/htsmsg_binary.c index 0a835eaae..ef5cbf650 100644 --- a/src/htsmsg_binary.c +++ b/src/htsmsg_binary.c @@ -43,10 +43,10 @@ htsmsg_binary_des0(htsmsg_t *msg, const uint8_t *buf, size_t len) type = buf[0]; namelen = buf[1]; - datalen = (buf[2] << 24) | - (buf[3] << 16) | - (buf[4] << 8 ) | - (buf[5] ); + datalen = (((uint_fast32_t)buf[2]) << 24) | + (((uint_fast32_t)buf[3]) << 16) | + (((uint_fast32_t)buf[4]) << 8 ) | + (((uint_fast32_t)buf[5]) ); buf += 6; len -= 6;