[CinCV-commits] CinelerraCV.git (#1229) - master (branch) updated: v2.1.5-186-g3e2a3a6

git version control git at cinelerra-cv.org
Thu Jun 26 19:36:44 CEST 2014


The branch, master has been updated
       via  3e2a3a61302c9cde9839d831b7d39461c0dc3d8a (commit)
      from  d83b8d51d2d2c691dccd4b3120c4d0197ed47e5c (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 3e2a3a61302c9cde9839d831b7d39461c0dc3d8a
Author: Einar Rünkaru <einarry at smail.ee>
Date:   Wed Jun 25 21:52:50 2014 +0300

    Fixed reference by uninitalized pointer in BC_TextBox::default_keypress
    
    Made temp_string local and allocated buffer for it
    Do not assume that pointer can have only positive value.

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

Summary of changes:
 guicast/bctextbox.C |    5 ++++-
 guicast/bctextbox.h |    1 -
 2 files changed, 4 insertions(+), 2 deletions(-)

The diff of changes is:
diff --git a/guicast/bctextbox.C b/guicast/bctextbox.C
index 0078e7c..242e998 100644
--- a/guicast/bctextbox.C
+++ b/guicast/bctextbox.C
@@ -679,6 +679,9 @@ int BC_TextBox::repeat_event(int64_t duration)
 
 void BC_TextBox::default_keypress(int &dispatch_event, int &result)
 {
+	char buffer[4];
+	char *temp_string = buffer;
+
 	if((top_level->get_keypress() == RETURN) ||
 		(top_level->get_keypress() > 30 && top_level->get_keypress() <= 255))
 	{
@@ -693,7 +696,7 @@ void BC_TextBox::default_keypress(int &dispatch_event, int &result)
 			else
 			{
 #ifdef X_HAVE_UTF8_STRING
-				if (top_level->get_keypress_utf8() > 0)
+				if (top_level->get_keypress_utf8())
 					temp_string = top_level->get_keypress_utf8();
 				else
 				{
diff --git a/guicast/bctextbox.h b/guicast/bctextbox.h
index 3324744..2b3205e 100644
--- a/guicast/bctextbox.h
+++ b/guicast/bctextbox.h
@@ -160,7 +160,6 @@ private:
 	int high_color, back_color;
 	int background_color;
 	char text[BCTEXTLEN], text_row[BCTEXTLEN];
-	char* temp_string;
 	int active;
 	int enabled;
 	int precision;


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