[FFmpeg-devel] [PATCH v2 1/2] avcodec: Fix warnings with signed/unsigned compare in bitstream.h
Devin Heitmueller
devin.heitmueller at ltnglobal.com
Mon Mar 27 16:12:16 EEST 2023
On Sat, Mar 25, 2023 at 1:10 PM Marton Balint <cus at passwd.hu> wrote:
> I am not sure if overread/overwrote is a supported state for these
> functions. As far as I see bytestream2_get_buffer, bytestream2_put_buffer,
> bytestream2_copy_buffer and bytestream2_set_buffer just crashes if
> buffer_end < buffer because sooner or later memcpy/memset gets a negative
> value. There are no special checks to handle it.
This was the conclusion I came to as well. I couldn't imagine a case
where it would ever actually work, since prior to my patch in every
case it results in a call to memcpy() with a negative length argument.
Devin
--
Devin Heitmueller, Senior Software Engineer
LTN Global Communications
o: +1 (301) 363-1001
w: https://ltnglobal.com e: devin.heitmueller at ltnglobal.com
More information about the ffmpeg-devel
mailing list