about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authormarco <marco@conformal.com>2012-01-05 17:12:53 -0600
committermarco <marco@conformal.com>2012-01-05 17:12:53 -0600
commita0befe5b412ef8c8296f83e4ede2792f759647c3 (patch)
treef4af92e741fa3315ea516e920098fb4e1ffb8d0d
parentf3549778e7c4473f06c5d2d83422ea4a89d45371 (diff)
downloadxombrero-a0befe5b412ef8c8296f83e4ede2792f759647c3.tar.gz
add a bit more paranoia to gtk returned strings
-rw-r--r--xxxterm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xxxterm.c b/xxxterm.c
index 0cdca75..74eab2f 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -1362,6 +1362,8 @@ paste_uri(struct tab *t, struct karg *args)
 		    NULL,
 		    &len,
 		    (guchar **)&p)) {
+			if (p == NULL)
+				goto done;
 			/* yes sir, we need to NUL the string */
 			p[len] = '\0';
 		}
@@ -6820,6 +6822,8 @@ clipb_primary_cb(GtkClipboard *primary, GdkEvent *event, gpointer notused)
 		    NULL,
 		    &len,
 		    (guchar **)&p)) {
+			if (p == NULL)
+				return;
 			/* yes sir, we need to NUL the string */
 			p[len] = '\0';
 			gtk_clipboard_set_text(primary, p, -1);