On 02/23/2017 08:50 PM, Luca Barbato wrote: > On 24/02/2017 01:05, John Stebbins wrote: >> avio_skip returns file position and overflows int >> --- >> libavformat/asfdec.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c >> index 34730b2..10d3396 100644 >> --- a/libavformat/asfdec.c >> +++ b/libavformat/asfdec.c >> @@ -976,7 +976,8 @@ static int asf_read_simple_index(AVFormatContext *s, >> const GUIDParseTable *g) >> uint64_t interval; // index entry time interval in 100 ns units, >> usually it's 1s >> uint32_t pkt_num, nb_entries; >> int32_t prev_pkt_num = -1; >> - int i, ret; >> + int i; >> + int64_t ret; >> uint64_t size = avio_rl64(pb); >> >> // simple index objects should be ordered by stream number, this loop >> tries to find >> > Sounds good, I hadn't look at the code but maybe it might be clearer > using a second variable. > >
ret is only used for this one instance of avio_skip and nowhere else in the function. But would you prefer I rename it to something like "offset" so that the code documents itself better? -- John GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01 83F0 49F1 D7B2 60D4 D0F7
signature.asc
Description: OpenPGP digital signature
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
