summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-12-19 16:39:49 -0500
committerMatthias Clasen <mclasen@redhat.com>2013-12-19 16:39:49 -0500
commit263807a6fb20da6f7a0054bd2f5afb1d84a4407a (patch)
tree559bcae287c8fb8b75b8ededb3c735f30d3322c7
parentfb71dc51cbdf7d7a572f9ba5dfbf0496f75c2bbf (diff)
downloadgdk-pixbuf-263807a6fb20da6f7a0054bd2f5afb1d84a4407a.tar.gz
Allow single-character keys for tEXt chunks
The keys for tEXt chunks are documented as 1-79 character ASCII strings. Testing this shows that we reject single- character keys as too short. Fix that.
-rw-r--r--gdk-pixbuf/io-png.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
index 454e92b79..c57089904 100644
--- a/gdk-pixbuf/io-png.c
+++ b/gdk-pixbuf/io-png.c
@@ -852,7 +852,7 @@ static gboolean real_save_png (GdkPixbuf *pixbuf,
if (strncmp (*kiter, "tEXt::", 6) == 0) {
gchar *key = *kiter + 6;
int len = strlen (key);
- if (len <= 1 || len > 79) {
+ if (len < 1 || len > 79) {
g_set_error_literal (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_BAD_OPTION,