Commit 3875d507 authored by Vasil Velichkov's avatar Vasil Velichkov Committed by Lev Walkin

Switch uint8_t to size_t as len_len's type

parent e56f4b24
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
ssize_t ssize_t
oer_fetch_length(const void *bufptr, size_t size, size_t *len_r) { oer_fetch_length(const void *bufptr, size_t size, size_t *len_r) {
uint8_t first_byte; uint8_t first_byte;
uint8_t len_len; /* Length of the length determinant */ size_t len_len; /* Length of the length determinant */
const uint8_t *b; const uint8_t *b;
const uint8_t *bend; const uint8_t *bend;
size_t len; size_t len;
...@@ -35,7 +35,7 @@ oer_fetch_length(const void *bufptr, size_t size, size_t *len_r) { ...@@ -35,7 +35,7 @@ oer_fetch_length(const void *bufptr, size_t size, size_t *len_r) {
} }
len_len = (first_byte & 0x7f); len_len = (first_byte & 0x7f);
if((size_t)(1 + len_len) > size) { if((1 + len_len) > size) {
*len_r = 0; *len_r = 0;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment