From: Andreas Rheinhardt <[email protected]> Otherwise it might be > buf_ptr in which case ffio_get_checksum() could segfault (s->buf_ptr - s->checksum_ptr would be negative which would be converted to something very big when converted to unsigned for the update_checksum callback).
Fixes ticket #11233. Reported-by: Du4t Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavformat/aviobuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 6a74c1ce68..9041280e77 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -308,7 +308,7 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) ctx->seek_count++; if (!s->write_flag) s->buf_end = s->buffer; - s->buf_ptr = s->buf_ptr_max = s->buffer; + s->checksum_ptr = s->buf_ptr = s->buf_ptr_max = s->buffer; s->pos = offset; } s->eof_reached = 0; -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
