[CinCV-commits] CinelerraCV.git (#1221) - master (branch) updated: v2.1.5-178-g9425aff

git version control git at cinelerra-cv.org
Wed Jun 25 08:55:30 CEST 2014


The branch, master has been updated
       via  9425aff54020c8667cfde22daa21c209aee7922e (commit)
      from  cc8dcf138f3ee5fefb59d04939eb497e44bbc01e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9425aff54020c8667cfde22daa21c209aee7922e
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Wed Jun 25 08:53:45 2014 +0200

    Make sure rgba values always have known values in overlayframe.C
    
    Coverity observed that it could happen that the BLEND_3() and BLEND_4()
    macros used by the TRANSLATE() macro could end up setting the rgb(a)
    values to uninitialized content if the mode is not among the values
    handled by the switch().  This patch make sure also this case result in
    well known values - setting them to zero to get black/transparent as the
    result if this ever happen, and reduce the amount of open Coverity
    issues.  An alternative which also would make sense, would be to set
    them to the max value to get white/non-trasparent.  I picked black
    fairly randomly, as zero seemed like a nice value to use for
    initialization.
    
    Fixes Coverity CIDs 58909-58912.

-----------------------------------------------------------------------

Summary of changes:
 cinelerra/overlayframe.C |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/cinelerra/overlayframe.C b/cinelerra/overlayframe.C
index 343bd5f..160a1a8 100644
--- a/cinelerra/overlayframe.C
+++ b/cinelerra/overlayframe.C
@@ -102,7 +102,7 @@ OverlayFrame::~OverlayFrame()
 
 #define BLEND_3(max, temp_type, type, chroma_offset) \
 { \
-	temp_type r, g, b; \
+	temp_type r = 0, g = 0, b = 0; \
  \
 /* if(mode != TRANSFER_NORMAL) printf("BLEND mode = %d\n", mode); */ \
 	switch(mode) \
@@ -223,7 +223,7 @@ OverlayFrame::~OverlayFrame()
 // Blending equations are drastically different for 3 and 4 components
 #define BLEND_4(max, temp_type, type, chroma_offset) \
 { \
-	temp_type r, g, b, a; \
+	temp_type r = 0, g = 0, b = 0, a = 0; \
 	temp_type pixel_opacity, pixel_transparency; \
 	temp_type output1 = output[0]; \
 	temp_type output2 = output[1]; \


hooks/post-receive
-- 
CinelerraCV.git (CinelerraCV)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CinelerraCV.git" (CinelerraCV).



More information about the cinelerra-commits mailing list