File libpng15-CVE-2015-8540.patch of Package libpng15.3389

--- a/pngwutil.c
+++ b/pngwutil.c
@@ -1580,7 +1580,7 @@
    {
       png_warning(png_ptr, "trailing spaces removed from keyword");
 
-      while (*kp == ' ')
+      while (key_len && *kp == ' ')
       {
          *(kp--) = '\0';
          key_len--;