Re: [FFmpeg-devel] [PATCH] ffmpeg: fix uninitialized return value

2016-11-22 Thread Tobias Rapp

On 22.11.2016 15:06, Michael Niedermayer wrote:

On Tue, Nov 22, 2016 at 02:43:57PM +0100, Tobias Rapp wrote:

On 22.11.2016 14:34, Michael Niedermayer wrote:

On Tue, Nov 22, 2016 at 09:16:26AM +0100, Tobias Rapp wrote:

Signed-off-by: Tobias Rapp 
---
ffmpeg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


do you have a testcase for this ?


No, I just stumbled over it when reading the code.


are you sure that the codepath leaving ret uninitialized is possible ?

if not adding a av_assert() may be better


From my quick glance I assumed that ist->nb_filters could be zero and 
the for-loop is not entered. If that should never be the case I agree 
that an added av_assert(ist->nb_filters > 0) would be better.


Regards,
Tobias

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


Re: [FFmpeg-devel] [PATCH] ffmpeg: fix uninitialized return value

2016-11-22 Thread Michael Niedermayer
On Tue, Nov 22, 2016 at 02:43:57PM +0100, Tobias Rapp wrote:
> On 22.11.2016 14:34, Michael Niedermayer wrote:
> >On Tue, Nov 22, 2016 at 09:16:26AM +0100, Tobias Rapp wrote:
> >>Signed-off-by: Tobias Rapp 
> >>---
> >> ffmpeg.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >do you have a testcase for this ?
> 
> No, I just stumbled over it when reading the code.

are you sure that the codepath leaving ret uninitialized is possible ?

if not adding a av_assert() may be better

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] ffmpeg: fix uninitialized return value

2016-11-22 Thread Tobias Rapp

On 22.11.2016 14:34, Michael Niedermayer wrote:

On Tue, Nov 22, 2016 at 09:16:26AM +0100, Tobias Rapp wrote:

Signed-off-by: Tobias Rapp 
---
 ffmpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


do you have a testcase for this ?


No, I just stumbled over it when reading the code.

Regards,
Tobias

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


Re: [FFmpeg-devel] [PATCH] ffmpeg: fix uninitialized return value

2016-11-22 Thread Michael Niedermayer
On Tue, Nov 22, 2016 at 09:16:26AM +0100, Tobias Rapp wrote:
> Signed-off-by: Tobias Rapp 
> ---
>  ffmpeg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

do you have a testcase for this ?

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel