Replace int -> uint to avoid signed integer overflow
An example of such an error (should be compiled with DEBUG_SANITIZE): runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
c31b54fd81
commit
8762512fdb
@@ -94,7 +94,7 @@ static int receive(/*int read_fd, */int file_fd)
|
||||
int blockBegin;
|
||||
int blockNo, blockNoOnesCompl;
|
||||
int cksum_or_crc;
|
||||
int expected;
|
||||
unsigned expected;
|
||||
int i, j;
|
||||
|
||||
blockBegin = read_byte(timeout);
|
||||
|
Reference in New Issue
Block a user