Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
htsmsg binary: coverity - int / uint_fast32 conversion
  • Loading branch information
perexg committed May 23, 2016
1 parent c3a281c commit e687adf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/htsmsg_binary.c
Expand Up @@ -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;
Expand Down

0 comments on commit e687adf

Please sign in to comment.