diff options
author | Rostislav Skudnov <rostislav@tuxera.com> | 2017-02-01 18:35:13 +0000 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-02-04 23:10:22 +0100 |
commit | 8762512fdb088acefb9f3ea5f7b1e1bf2d336ff3 (patch) | |
tree | 309e04746b4bcb6f2ad645b29f7fcecfbff339e5 /miscutils/rx.c | |
parent | c31b54fd81690b3df3898437f5865674d06e6577 (diff) | |
download | busybox-w32-8762512fdb088acefb9f3ea5f7b1e1bf2d336ff3.tar.gz busybox-w32-8762512fdb088acefb9f3ea5f7b1e1bf2d336ff3.tar.bz2 busybox-w32-8762512fdb088acefb9f3ea5f7b1e1bf2d336ff3.zip |
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>
Diffstat (limited to 'miscutils/rx.c')
-rw-r--r-- | miscutils/rx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/miscutils/rx.c b/miscutils/rx.c index 36fc20a72..1f6f2825c 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c | |||
@@ -94,7 +94,7 @@ static int receive(/*int read_fd, */int file_fd) | |||
94 | int blockBegin; | 94 | int blockBegin; |
95 | int blockNo, blockNoOnesCompl; | 95 | int blockNo, blockNoOnesCompl; |
96 | int cksum_or_crc; | 96 | int cksum_or_crc; |
97 | int expected; | 97 | unsigned expected; |
98 | int i, j; | 98 | int i, j; |
99 | 99 | ||
100 | blockBegin = read_byte(timeout); | 100 | blockBegin = read_byte(timeout); |