diff options
Diffstat (limited to 'tests/libtest/lib510.c')
-rw-r--r-- | tests/libtest/lib510.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c index 68588cfe6..4c290f1ef 100644 --- a/tests/libtest/lib510.c +++ b/tests/libtest/lib510.c @@ -48,6 +48,10 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) if(data) { size_t len = strlen(data); + if(size*nmemb < len) { + fprintf(stderr, "read buffer is too small to run test\n"); + return 0; + } memcpy(ptr, data, len); pooh->counter++; /* advance pointer */ return len; |