]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
htsmsg binary: coverity - int / uint_fast32 conversion
authorJaroslav Kysela <perex@perex.cz>
Mon, 23 May 2016 19:07:48 +0000 (21:07 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 23 May 2016 19:07:48 +0000 (21:07 +0200)
src/htsmsg_binary.c

index 0a835eaaeca8db3daa9cac855f0a5598bba80cbb..ef5cbf65002f528cdd74f45c22c5bacd762a002a 100644 (file)
@@ -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;