[vte/vte-0-32] Remove a segfault when passing null in tag argument



commit 664c6eebf9cec5ed5e20cec36a8eca78f417d6d0
Author: Jacques-Pascal Deplaix <jp deplaix gmail com>
Date:   Sat May 26 17:08:56 2012 +0200

    Remove a segfault when passing null in tag argument
    
    Bug #676886.

 src/vte.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/vte.c b/src/vte.c
index 0657921..a60bb71 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -1503,7 +1503,9 @@ vte_terminal_match_check_internal_vte(VteTerminal *terminal,
 
 	_vte_debug_print(VTE_DEBUG_EVENTS,
 			"Checking for match at (%ld,%ld).\n", row, column);
-	*tag = -1;
+	if (tag != NULL) {
+		*tag = -1;
+	}
 	if (start != NULL) {
 		*start = 0;
 	}
@@ -1727,7 +1729,9 @@ vte_terminal_match_check_internal_gregex(VteTerminal *terminal,
 
 	_vte_debug_print(VTE_DEBUG_EVENTS,
 			"Checking for gregex match at (%ld,%ld).\n", row, column);
-	*tag = -1;
+	if (tag != NULL) {
+		*tag = -1;
+	}
 	if (start != NULL) {
 		*start = 0;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]