diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-24 18:23:05 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-08-24 18:23:05 +0000 |
commit | fab52deda9f08eed9ba7ab24113400b31474cc48 (patch) | |
tree | b658f4af44afaece1ed395f902f05a08b2c8959d /tests/test_decode1.c | |
parent | 9af96cd669f7f9189cdedcef110e7dbc1d526857 (diff) |
Make fuzz test runnable again :)
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@971 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'tests/test_decode1.c')
-rw-r--r-- | tests/test_decode1.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_decode1.c b/tests/test_decode1.c index def45a67..b46d0d5a 100644 --- a/tests/test_decode1.c +++ b/tests/test_decode1.c @@ -63,7 +63,10 @@ bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) int main() { - pb_istream_t stream = {&callback, stdin, SIZE_MAX}; + /* Maximum size is specified to prevent infinite length messages from + * hanging this in the fuzz test. + */ + pb_istream_t stream = {&callback, stdin, 10000}; if (!print_person(&stream)) printf("Parsing failed.\n"); |