]> git.sesse.net Git - mlt/commit
mlt_producer_seek(): check that eof is not NULL
authorMikko Rapeli <mikko.rapeli@iki.fi>
Wed, 25 Jul 2012 16:05:52 +0000 (18:05 +0200)
committerMikko Rapeli <mikko.rapeli@iki.fi>
Wed, 25 Jul 2012 22:17:56 +0000 (00:17 +0200)
commitef0d7da89ebe98a02de857a9b4c05eb617b15b38
tree8798f2e575a6ef966de7d3ddf863d507b412b4b2
parent260ab5b3e3ab516c8ed3196f6f3f95de92e3d993
mlt_producer_seek(): check that eof is not NULL

Fixes Coverity CID 709348: Dereference after null check (FORWARD_NULL)
Comparing "eof" to null implies that "eof" might be null.
 310        else if ( use_points && ( eof == NULL || !strcmp( eof, "pause" ) ) && position >= mlt_producer_get_playtime( self ) )
 311        {
 312                mlt_producer_set_speed( self, 0 );
 313                position = mlt_producer_get_playtime( self ) - 1;
 314        }
At conditional (3): "use_points" taking the true branch.
Passing null variable "eof" to function "strcmp", which dereferences it. (The dereference is assumed on the basis of the 'nonnull' parameter attribute.)
 315        else if ( use_points && !strcmp( eof, "loop" ) && position >= mlt_producer_get_playtime( self ) )
src/framework/mlt_producer.c