diff options
author | ache <ache@FreeBSD.org> | 2004-05-16 04:18:34 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2004-05-16 04:18:34 +0000 |
commit | 0da285892c2afa5ed7339b2ac09e5f7d7d3d46b9 (patch) | |
tree | 3a3e8724805e1e06093094452a0488775fa3f2bd /graphics/png | |
parent | 66504e3975b06666ee98714fc6cecbae8c3aa85f (diff) | |
download | FreeBSD-ports-0da285892c2afa5ed7339b2ac09e5f7d7d3d46b9.zip FreeBSD-ports-0da285892c2afa5ed7339b2ac09e5f7d7d3d46b9.tar.gz |
Better fix for copy from overflow problem
Diffstat (limited to 'graphics/png')
-rw-r--r-- | graphics/png/Makefile | 2 | ||||
-rw-r--r-- | graphics/png/files/patch-ac | 18 |
2 files changed, 6 insertions, 14 deletions
diff --git a/graphics/png/Makefile b/graphics/png/Makefile index f3c9cda..eacb963 100644 --- a/graphics/png/Makefile +++ b/graphics/png/Makefile @@ -7,7 +7,7 @@ PORTNAME= png PORTVERSION= 1.2.5 -PORTREVISION= 4 +PORTREVISION= 5 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 index c43f263..335d4ff 100644 --- a/graphics/png/files/patch-ac +++ b/graphics/png/files/patch-ac @@ -1,19 +1,11 @@ ---- 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 +--- pngerror.c.bak Thu Oct 3 15:32:27 2002 ++++ pngerror.c Sun May 16 08:10:42 2004 +@@ -137,7 +137,7 @@ { -+ 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; ++ strncpy(buffer+iout, error_message, 63); + buffer[iout+63] = 0; } } - |