[gdk-pixbuf] Allow single-character keys for tEXt chunks



commit 263807a6fb20da6f7a0054bd2f5afb1d84a4407a
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Dec 19 16:39:49 2013 -0500

    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.

 gdk-pixbuf/io-png.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
index 454e92b..c570899 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]