diff options
author | Stanislav Brabec <utx@penguin.cz> | 2009-07-29 18:16:16 +0000 |
---|---|---|
committer | utx@penguin.cz <utx@penguin.cz> | 2009-07-29 18:16:16 +0000 |
commit | 8d8036ab7de4871811375a94eb7c72be393f459b (patch) | |
tree | 119016bce4cd370cdde18eddce197f440ed9eba2 /recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch | |
parent | 5fe09b5028eac0d99a85e0f9e14b99892dd60fb2 (diff) |
gqview: Use motion hints for smooth panning. Sanitize rc file parser. Fixed gimp call.
Diffstat (limited to 'recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch')
-rw-r--r-- | recipes/gqview/gqview-2.1.5/gqview-rc-quotes.patch | 26 |
1 files changed, 26 insertions, 0 deletions
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)); |