]> git.sesse.net Git - mlt/commit
qimage/producer_kdenlivetitle.c: add error handling
authorMikko Rapeli <mikko.rapeli@iki.fi>
Tue, 31 Jul 2012 11:23:00 +0000 (13:23 +0200)
committerMikko Rapeli <mikko.rapeli@iki.fi>
Mon, 6 Aug 2012 16:37:27 +0000 (18:37 +0200)
commit20e108c090969f91864b856d3623b6084608d9dd
tree0d7ce503cc3b0259a2cfb8bb219375769f8f2bf2
parenta20c128da4c2c0be13da43fe346f53c7051080cb
qimage/producer_kdenlivetitle.c: add error handling

Fixes Coverity CID 709363: Argument cannot be negative (NEGATIVE_RETURNS)
Function "ftell(f)" returns a negative number.
Assigning: signed variable "lSize" = "ftell".
 37                lSize = ftell (f);
 38                rewind (f);
 39
 40                char *infile = (char*) mlt_pool_alloc(lSize);
"lSize" is passed to a parameter that cannot be negative.

and compiler warning:

producer_kdenlivetitle.c: In function ‘read_xml’:
producer_kdenlivetitle.c:49:19: warning: ‘infile’ may be used uninitialized in this function [-Wmaybe-uninitialized]
src/modules/qimage/producer_kdenlivetitle.c