Michael Niedermayer <[email protected]> added the comment:

On Wed, Aug 26, 2009 at 03:18:52PM +0000, Kent Mein wrote:
> 
> New submission from Kent Mein <[email protected]>:
> 
> Another day another batch of coverity issues to fix :)
> CID: 258
> Checker: FORWARD_NULL (help)
> File: base/src/extern/ffmpeg/libavcodec/mpegvideo_enc.c
> Function: copy_picture_attributes
> Description: Variable "(src)->mb_type" tracked as NULL was passed to a 
> function
> that dereferences it.
> 
> Move the memcpy to the check to see if the pointer is valid first.

i can confirm that our code is not ideal but your patch is not correct,
these are error conditions in terms of the user application passing invalid
data to libavcodec
Ideally we should not segfault, but in practice its not a big issue, the user
app could have provided a invalid array instead of NULL that would crash as
well

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

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin

_____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue1346>
_____________________________________________________

Reply via email to