On Wed, May 20, 2015 at 07:15:10PM +0200, Andreas Cadhalpun wrote:
> On 20.05.2015 16:58, Luca Barbato wrote:
> > On 20/05/15 16:35, Andreas Cadhalpun wrote:
> >> On 20.05.2015 03:46, Michael Niedermayer wrote:
> >>> this could check the return code from get_str()
> >>> which would return failure on EOF already i think
> >>> that would be slightly simpler
> >>
> >> No, get_str only fails if len > maxlen, which is not necessarily
> >> the case on EOF.
> >>
> > 
> > I think the idea is to embed in get_str the eof check and check its
> > result then.
> 
> Michael did that [1], so attached is a patch relying on this.
> 
> Best regards,
> Andreas
> 
> 1: 
> https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=6bbb2f8f4da67af374d62403742482cc5962aa21

>  nutdec.c |   16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> f12e470bce420dfcc9533cbc729750f1888a6732  
> 0003-nutdec-abort-if-EOF-is-reached-in-decode_info_header.patch
> From a6f28198c4f85a32fddf49c52a3444dbf6882b48 Mon Sep 17 00:00:00 2001
> From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
> Date: Wed, 20 May 2015 00:34:42 +0200
> Subject: [PATCH 3/3] nutdec: abort if EOF is reached in
>  decode_info_header/read_sm_data
> 
> These loops can take a lot of time if count is very large.

LGTM

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin

Attachment: signature.asc
Description: Digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to