[gegl] tools/introspect: harden escape() against NULL strings
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] tools/introspect: harden escape() against NULL strings
- Date: Wed, 21 Mar 2012 12:04:41 +0000 (UTC)
commit fefceae946d50c2579147fd4aa207830b54db69c
Author: Nils Philippsen <nils redhat com>
Date: Wed Mar 21 13:00:50 2012 +0100
tools/introspect: harden escape() against NULL strings
This can happen e.g. if the blurb of a property is NULL.
tools/introspect.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tools/introspect.c b/tools/introspect.c
index 2fcb86c..7e4eab3 100644
--- a/tools/introspect.c
+++ b/tools/introspect.c
@@ -55,7 +55,7 @@ static gchar *escape (const gchar *string)
const gchar *p=string;
gint i=0;
- while (*p)
+ while (p && *p)
{
switch (*p)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]