Commit 4205d7a6 authored by Frank Barchard's avatar Frank Barchard Committed by Commit Bot

Fix for jpeg to allow fuzz

Bug: None
Change-Id: I6eecef4f755ffb9e3eeee9f8ca7890b3445b14a5
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1884878Reviewed-by: 's avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
parent 53b529e3
...@@ -417,7 +417,10 @@ void init_source(j_decompress_ptr cinfo) { ...@@ -417,7 +417,10 @@ void init_source(j_decompress_ptr cinfo) {
boolean fill_input_buffer(j_decompress_ptr cinfo) { boolean fill_input_buffer(j_decompress_ptr cinfo) {
BufferVector* buf_vec = reinterpret_cast<BufferVector*>(cinfo->client_data); BufferVector* buf_vec = reinterpret_cast<BufferVector*>(cinfo->client_data);
if (buf_vec->pos >= buf_vec->len) { if (buf_vec->pos >= buf_vec->len) {
// Don't assert-fail when fuzzing.
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
assert(0 && "No more data"); assert(0 && "No more data");
#endif
// ERROR: No more data // ERROR: No more data
return FALSE; return FALSE;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment