aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2013-05-19 14:06:36 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2013-05-19 14:06:36 +0000
commit00093d96e5a07c500f70119efb9f127d833fe71a (patch)
tree762a0401a70ea57e1461e1924e78e4af757b564b /x11-toolkits
parent9340cae06890d5a800b20cf5866e77d2dc929ab0 (diff)
downloadports-00093d96e5a07c500f70119efb9f127d833fe71a.tar.gz
ports-00093d96e5a07c500f70119efb9f127d833fe71a.zip
Notes
Diffstat (limited to 'x11-toolkits')
-rw-r--r--x11-toolkits/plib/Makefile2
-rw-r--r--x11-toolkits/plib/files/patch-src-ssg-ssgParser.cxx60
-rw-r--r--x11-toolkits/plib/files/patch-src-util-ulError.cxx18
3 files changed, 79 insertions, 1 deletions
diff --git a/x11-toolkits/plib/Makefile b/x11-toolkits/plib/Makefile
index 9c710f71ea73..142ab6c4e16f 100644
--- a/x11-toolkits/plib/Makefile
+++ b/x11-toolkits/plib/Makefile
@@ -7,7 +7,7 @@
PORTNAME= plib
PORTVERSION= 1.8.5
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= x11-toolkits
MASTER_SITES= http://plib.sourceforge.net/dist/
diff --git a/x11-toolkits/plib/files/patch-src-ssg-ssgParser.cxx b/x11-toolkits/plib/files/patch-src-ssg-ssgParser.cxx
new file mode 100644
index 000000000000..1894b32fe9af
--- /dev/null
+++ b/x11-toolkits/plib/files/patch-src-ssg-ssgParser.cxx
@@ -0,0 +1,60 @@
+Index: src/ssg/ssgParser.cxx
+===================================================================
+--- src/ssg/ssgParser.cxx.orig
++++ src/ssg/ssgParser.cxx
+@@ -57,18 +57,18 @@ void _ssgParser::error( const char *form
+ char msgbuff[ 255 ];
+ va_list argp;
+
+- char* msgptr = msgbuff;
+- if (linenum)
+- {
+- msgptr += sprintf ( msgptr,"%s, line %d: ",
+- path, linenum );
+- }
+-
+ va_start( argp, format );
+- vsprintf( msgptr, format, argp );
++ vsnprintf( msgbuff, sizeof(msgbuff)-1, format, argp );
+ va_end( argp );
++
++ msgbuff[sizeof(msgbuff)-1] = '\0';
+
+- ulSetError ( UL_WARNING, "%s", msgbuff ) ;
++ if (linenum)
++ {
++ ulSetError ( UL_WARNING, "%s, line %d: %s", path, linenum, msgbuff ) ;
++ } else {
++ ulSetError ( UL_WARNING, "%s", msgbuff ) ;
++ }
+ }
+
+
+@@ -78,18 +78,18 @@ void _ssgParser::message( const char *fo
+ char msgbuff[ 255 ];
+ va_list argp;
+
+- char* msgptr = msgbuff;
+- if (linenum)
+- {
+- msgptr += sprintf ( msgptr,"%s, line %d: ",
+- path, linenum );
+- }
+-
+ va_start( argp, format );
+- vsprintf( msgptr, format, argp );
++ vsnprintf( msgbuff, sizeof(msgbuff)-1, format, argp );
+ va_end( argp );
++
++ msgbuff[sizeof(msgbuff)-1] = '\0';
+
+- ulSetError ( UL_DEBUG, "%s", msgbuff ) ;
++ if (linenum)
++ {
++ ulSetError ( UL_DEBUG, "%s, line %d: %s", path, linenum, msgbuff ) ;
++ } else {
++ ulSetError ( UL_DEBUG, "%s", msgbuff ) ;
++ }
+ }
+
+ // Opens the file and does a few internal calculations based on the spec.
diff --git a/x11-toolkits/plib/files/patch-src-util-ulError.cxx b/x11-toolkits/plib/files/patch-src-util-ulError.cxx
new file mode 100644
index 000000000000..d04ec3170be0
--- /dev/null
+++ b/x11-toolkits/plib/files/patch-src-util-ulError.cxx
@@ -0,0 +1,18 @@
+Index: src/util/ulError.cxx
+===================================================================
+--- src/util/ulError.cxx.orig
++++ src/util/ulError.cxx
+@@ -39,9 +39,11 @@ void ulSetError ( enum ulSeverity severi
+ {
+ va_list argp;
+ va_start ( argp, fmt ) ;
+- vsprintf ( _ulErrorBuffer, fmt, argp ) ;
++ vsnprintf ( _ulErrorBuffer, sizeof(_ulErrorBuffer)-1, fmt, argp ) ;
+ va_end ( argp ) ;
+-
++
++ _ulErrorBuffer[sizeof(_ulErrorBuffer)-1] = '\0';
++
+ if ( _ulErrorCB )
+ {
+ (*_ulErrorCB)( severity, _ulErrorBuffer ) ;