From 8d8036ab7de4871811375a94eb7c72be393f459b Mon Sep 17 00:00:00 2001 From: Stanislav Brabec Date: Wed, 29 Jul 2009 18:16:16 +0000 Subject: gqview: Use motion hints for smooth panning. Sanitize rc file parser. Fixed gimp call. --- recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch (limited to 'recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch') diff --git a/recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch b/recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch new file mode 100644 index 0000000000..9e8f94f9f2 --- /dev/null +++ b/recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch @@ -0,0 +1,26 @@ +--- src/rcfile.c ++++ src/rcfile.c +@@ -390,7 +390,7 @@ + gchar option[1024]; + gchar value[1024]; + gchar value_all[1024]; +- gint c,l,i; ++ gint c,l,i,inside_quotes; + + rc_path = g_strconcat(homedir(), "/", GQVIEW_RC_DIR, "/", RC_FILE_NAME, NULL); + +@@ -416,7 +416,13 @@ + while ((s_buf[c] == ' ' || s_buf[c] == 8) && c < l) c++; + s_buf_ptr = s_buf + c; + strncpy(value_all, s_buf_ptr, sizeof(value_all)); +- while (s_buf[c] != 8 && s_buf[c] != ' ' && s_buf[c] != '\n' && c < l) c++; ++ inside_quotes = 0; ++ while (s_buf[c] != 8 && ( s_buf[c] != ' ' || inside_quotes) && s_buf[c] != '\n' && c < l) ++ { ++ /* this is an ugly hack, which does not sanitize value inside quotes */ ++ if (s_buf[c] == '"') inside_quotes = !inside_quotes; ++ c++; ++ } + s_buf[c] = '\0'; + strncpy(option, s_buf, sizeof(option)); + strncpy(value, s_buf_ptr, sizeof(value)); -- cgit v1.2.3