diff options
-rw-r--r-- | pb_decode.c | 4 | ||||
-rw-r--r-- | tests/Makefile | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pb_decode.c b/pb_decode.c index 28856d37..a722e893 100644 --- a/pb_decode.c +++ b/pb_decode.c @@ -148,8 +148,8 @@ static bool read_raw_value(pb_istream_t *stream, int wire_type, uint8_t *buf, si { (*size)++; if (*size > max_size) return false; - if (!pb_read(stream, buf++, 1)) return false; - } while (*buf & 0x80); + if (!pb_read(stream, buf, 1)) return false; + } while (*buf++ & 0x80); return true; case WT_64BIT: diff --git a/tests/Makefile b/tests/Makefile index 3053fa4a..d357c674 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -10,4 +10,4 @@ test_decode1: test_decode1.c $(DEPS) $(CC) $(CFLAGS) -o $@ $< ../pb_decode.c fuzztest: test_decode1 - I=1; while cat /dev/urandom | ./test_decode1 > /dev/null; do I=$(($I+1)); echo -en "\r$I"; done
\ No newline at end of file + bash -c 'I=1; while cat /dev/urandom | ./test_decode1 > /dev/null; do I=$$(($$I+1)); echo -en "\r$$I"; done'
\ No newline at end of file |