X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Ftest_decode1.c;h=b46d0d5a85a49b250dfb4d35cebd98c9d1c9f694;hb=fab52deda9f08eed9ba7ab24113400b31474cc48;hp=def45a67be1ce78e410e8ee470efe8118a754404;hpb=9af96cd669f7f9189cdedcef110e7dbc1d526857;p=apps%2Fagl-service-can-low-level.git 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");