[54204] trunk/dports/graphics/pstoedit

toby at macports.org toby at macports.org
Wed Jul 22 19:45:01 PDT 2009


Revision: 54204
          http://trac.macports.org/changeset/54204
Author:   toby at macports.org
Date:     2009-07-22 19:45:00 -0700 (Wed, 22 Jul 2009)
Log Message:
-----------
#20393 (pstoedit 3.45 cmd line option -pagesize xx fails due to strcpy_s overflow)

Modified Paths:
--------------
    trunk/dports/graphics/pstoedit/Portfile

Added Paths:
-----------
    trunk/dports/graphics/pstoedit/files/patch-src__cppcomp.h

Modified: trunk/dports/graphics/pstoedit/Portfile
===================================================================
--- trunk/dports/graphics/pstoedit/Portfile	2009-07-23 02:18:48 UTC (rev 54203)
+++ trunk/dports/graphics/pstoedit/Portfile	2009-07-23 02:45:00 UTC (rev 54204)
@@ -4,7 +4,7 @@
 
 name                pstoedit
 version             3.45
-revision            2
+revision            3
 categories          graphics
 maintainers         nomaintainer
 description         Translate PostScript and PDF to other vector formats
@@ -26,7 +26,7 @@
                     port:zlib
 depends_run         port:ghostscript
 
-patchfiles          patch-src-pstoedit.diff
+patchfiles          patch-src-pstoedit.diff patch-src__cppcomp.h
 
 configure.cppflags-append   "-Wno-long-long"
 

Added: trunk/dports/graphics/pstoedit/files/patch-src__cppcomp.h
===================================================================
--- trunk/dports/graphics/pstoedit/files/patch-src__cppcomp.h	                        (rev 0)
+++ trunk/dports/graphics/pstoedit/files/patch-src__cppcomp.h	2009-07-23 02:45:00 UTC (rev 54204)
@@ -0,0 +1,11 @@
+--- src/cppcomp.h.orig	2007-07-22 04:27:40.000000000 -0700
++++ src/cppcomp.h	2009-07-22 19:43:48.000000000 -0700
+@@ -235,7 +235,7 @@
+ static inline void strncpy_s(char * de, size_t de_size, const char *  so, size_t count)   {
+ 	const size_t sourcelen = strlen(so);
+ 	size_t tobecopied = sourcelen < count ? sourcelen : count;
+-	if ( tobecopied < de_size ) {
++	if ( tobecopied <= de_size ) {
+ 		while (so && *so && (tobecopied > 0) ) {
+ 			*de = *so; ++de; ++so; --tobecopied;
+ 		} // does not copy final 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090722/cae45ebd/attachment.html>


More information about the macports-changes mailing list