[gimp/gimp-2-10] Issue #2388 - CRITICAL: XMP Toolkit error 4: Invalid UTF-8 data byte



commit 4e103be4e541223f7de3b523881f7f08f6c23195
Author: Michael Natterer <mitch gimp org>
Date:   Mon Oct 22 15:48:26 2018 +0200

    Issue #2388 - CRITICAL: XMP Toolkit error 4: Invalid UTF-8 data byte
    
    In gimp_metadata_add_xmp_history(), make sure the string returned by
    strftime() has a terminating \0 after we mess with its format.
    
    (cherry picked from commit 8421221b60572cdee31d7cce0c2ee99591f24473)

 libgimpbase/gimpmetadata.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/libgimpbase/gimpmetadata.c b/libgimpbase/gimpmetadata.c
index be76ce2564..e5efbe5345 100644
--- a/libgimpbase/gimpmetadata.c
+++ b/libgimpbase/gimpmetadata.c
@@ -415,6 +415,7 @@ gimp_metadata_add_xmp_history (GimpMetadata *metadata,
 
   /* get timezone and fix format */
   strftime (tzstr, 7, "%z", now_tm);
+  tzstr[6] = '\0';
   tzstr[5] = tzstr[4];
   tzstr[4] = tzstr[3];
   tzstr[3] = ':';


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