]> git.sesse.net Git - mlt/commitdiff
oldfilm/filter_dust.c: use correct argument for sizeof()
authorMikko Rapeli <mikko.rapeli@iki.fi>
Tue, 31 Jul 2012 09:34:17 +0000 (11:34 +0200)
committerMikko Rapeli <mikko.rapeli@iki.fi>
Mon, 6 Aug 2012 16:37:27 +0000 (18:37 +0200)
Fixes Coverity CID 709408: Wrong sizeof argument (SIZEOF_MISMATCH)
Passing argument "savepic" of type "uint8_t *" and argument "8 /* sizeof (uint8_t *) */" to function "mlt_properties_set_data" is suspicious.
142                                                mlt_properties_set_data ( properties , savename , savepic , sizeof(uint8_t*) , mlt_pool_release, NULL );
Passing argument "savealpha" of type "uint8_t *" and argument "8 /* sizeof (uint8_t *) */" to function "mlt_properties_set_data" is suspicious.
143

src/modules/oldfilm/filter_dust.c

index 34537b4bef1b1fdac4bd1fff24692b521bda484d..da331badac19117cbbf0fb0fc65e0d99ac30f63c 100644 (file)
@@ -139,8 +139,8 @@ static int filter_get_image( mlt_frame this, uint8_t **image, mlt_image_format *
                                                memcpy (savealpha, alpha , luma_width * luma_height );
                                                memcpy (savepic, luma_image , luma_width * luma_height * 2);
                                                
-                                               mlt_properties_set_data ( properties , savename , savepic , sizeof(uint8_t*) , mlt_pool_release, NULL );
-                                               mlt_properties_set_data ( properties , savename1 , savealpha , sizeof(uint8_t*)  ,  mlt_pool_release, NULL );
+                                               mlt_properties_set_data ( properties , savename , savepic , sizeof(savepic) , mlt_pool_release, NULL );
+                                               mlt_properties_set_data ( properties , savename1 , savealpha , sizeof(savealpha)  ,  mlt_pool_release, NULL );
                                                mlt_properties_set_int ( properties , cachedy , luma_height );
                                                
                                                overlay_image(*image,*width,*height,luma_image,luma_width,luma_height, alpha, x1, y1 , updown , mirror );