[FFmpeg-devel] [PATCH v2 02/14] bytestream: Make get_bytes_left compatible with overread
Michael Niedermayer
michael at niedermayer.cc
Mon Dec 16 00:53:05 EET 2019
On Sat, Dec 14, 2019 at 11:19:14PM +0100, Andreas Rheinhardt wrote:
> bytestream2_get_bytes_left returns an unsigned int; as a result,
> it returns big positive numbers if an overread already happened,
> making it unsuitable for scenarios where one wants to allow this
> in a controlled way (because the buffer is actually padded so that
> no segfaults can happen). So change it to return an ordinary int.
>
> Also, bytestream2_get_bytes_left_p has been modified in the same way.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> Implemented James' suggestion to return an int. I have not found a place
> where this would pose a problem.
How do we know that this doesnt break any code ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191215/086e9d8a/attachment.sig>
More information about the ffmpeg-devel
mailing list