Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRostislav Skudnov <rostislav@tuxera.com>2017-02-01 21:35:13 +0300
committerDenys Vlasenko <vda.linux@googlemail.com>2017-02-05 01:10:22 +0300
commit8762512fdb088acefb9f3ea5f7b1e1bf2d336ff3 (patch)
tree309e04746b4bcb6f2ad645b29f7fcecfbff339e5 /miscutils/rx.c
parentc31b54fd81690b3df3898437f5865674d06e6577 (diff)
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.c2
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)
int blockBegin;
int blockNo, blockNoOnesCompl;
int cksum_or_crc;
- int expected;
+ unsigned expected;
int i, j;
blockBegin = read_byte(timeout);