summaryrefslogtreecommitdiffstats
path: root/graphics/png/files/patch-ac
blob: c43f263aec03fb725a91fc977015a38fb33252fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- pngerror.c.orig	Thu Oct  3 15:32:27 2002
+++ pngerror.c	Mon May  3 01:18:27 2004
@@ -135,10 +135,14 @@
       buffer[iout] = 0;
    else
    {
+      int len = strlen(error_message);
+
+      if (len > 63)
+	 len = 63;
       buffer[iout++] = ':';
       buffer[iout++] = ' ';
-      png_memcpy(buffer+iout, error_message, 64);
-      buffer[iout+63] = 0;
+      png_memcpy(buffer+iout, error_message, len);
+      buffer[iout+len] = 0;
    }
 }
 
OpenPOWER on IntegriCloud