[gdk-pixbuf] io: Fix check if library is running inside build tree
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] io: Fix check if library is running inside build tree
- Date: Fri, 21 Nov 2014 15:37:59 +0000 (UTC)
commit d6c285a5e47964ab73836169cf919b0fa7a26186
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Nov 17 15:35:54 2014 +1300
io: Fix check if library is running inside build tree
The existing check was missing the length of the string so instead of reading
the end of the string it read the memory before it.
https://bugzilla.gnome.org/show_bug.cgi?id=733413
gdk-pixbuf/gdk-pixbuf-io.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
index dfc2c29..ebfdbd3 100644
--- a/gdk-pixbuf/gdk-pixbuf-io.c
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
@@ -350,7 +350,7 @@ correct_prefix (gchar **path)
strncmp (*path, GDK_PIXBUF_PREFIX "\\", strlen (GDK_PIXBUF_PREFIX "\\")) == 0)
{
gchar *tem = NULL;
- if (strlen(*path) > 5 && strncmp (*path - 5, ".libs", 5) == 0)
+ if (g_str_has_suffix (*path, ".libs"))
{
/* We are being run from inside the build tree, and shouldn't mess about. */
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]