[Xfce4-commits] <exo:master> Fix possible segfault in exo_str_looks_like_an_uri.

Nick Schermer noreply at xfce.org
Fri Apr 13 21:32:04 CEST 2012


Updating branch refs/heads/master
         to 0779a86ae051624030db730a42974091882980e0 (commit)
       from fe90dfba3d3f8e2324fa8ec712120b9e88559da6 (commit)

commit 0779a86ae051624030db730a42974091882980e0
Author: Nick Schermer <nick at xfce.org>
Date:   Fri Apr 13 21:30:41 2012 +0200

    Fix possible segfault in exo_str_looks_like_an_uri.

 exo/exo-string.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/exo/exo-string.c b/exo/exo-string.c
index b40c753..662b617 100644
--- a/exo/exo-string.c
+++ b/exo/exo-string.c
@@ -419,6 +419,9 @@ exo_str_looks_like_an_uri (const gchar *str)
 {
   const gchar *s = str;
 
+  if (G_UNLIKELY (str == NULL))
+    return FALSE;
+
   /* <scheme> starts with an alpha character */
   if (g_ascii_isalpha (*s))
     {


More information about the Xfce4-commits mailing list