From a0befe5b412ef8c8296f83e4ede2792f759647c3 Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 5 Jan 2012 17:12:53 -0600 Subject: add a bit more paranoia to gtk returned strings --- xxxterm.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit 1.4.1-2-gfad0