git-svn-id: https://svn.kapsi.fi/jpa/nanopb@946 e3a754e5-d11d-0410-8d38-ebb782a927b9
This commit is contained in:
Petteri Aimonen
2011-07-27 20:06:17 +00:00
parent 42e5fcc0be
commit d9238da690
2 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

@@ -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
bash -c 'I=1; while cat /dev/urandom | ./test_decode1 > /dev/null; do I=$$(($$I+1)); echo -en "\r$$I"; done'