aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2004-05-03 05:24:14 +0800
committerache <ache@FreeBSD.org>2004-05-03 05:24:14 +0800
commit78147cf5f4fce728ddec9efe82beb92b76d3f3cb (patch)
tree39d7beb4e38b093d38b4069611e501c24efd9534 /graphics
parent4a4c5d21c16c35c4394124ccf14c2686b873053c (diff)
downloadfreebsd-ports-gnome-78147cf5f4fce728ddec9efe82beb92b76d3f3cb.tar.gz
freebsd-ports-gnome-78147cf5f4fce728ddec9efe82beb92b76d3f3cb.tar.zst
freebsd-ports-gnome-78147cf5f4fce728ddec9efe82beb92b76d3f3cb.zip
Fix potential out of bounds copy from the string.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/png/Makefile2
-rw-r--r--graphics/png/files/patch-ac19
2 files changed, 20 insertions, 1 deletions
diff --git a/graphics/png/Makefile b/graphics/png/Makefile
index b8387d83f7b3..f3c9cdadc924 100644
--- a/graphics/png/Makefile
+++ b/graphics/png/Makefile
@@ -7,7 +7,7 @@
PORTNAME= png
PORTVERSION= 1.2.5
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= graphics
MASTER_SITES= http://www.libpng.org/pub/png/src/ \
ftp://swrinde.nde.swri.edu/pub/png/src/ \
diff --git a/graphics/png/files/patch-ac b/graphics/png/files/patch-ac
new file mode 100644
index 000000000000..c43f263aec03
--- /dev/null
+++ b/graphics/png/files/patch-ac
@@ -0,0 +1,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;
+ }
+ }
+