Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 2013 19:15:15 +0800 (CST)
From:      Denny Lin <dennylin93@hs.ntnu.edu.tw>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/178710: [PATCH] x11-toolkits/plib: Patch vulnerabilities
Message-ID:  <20130517111515.61E1E1C643D@mail.hs.ntnu.edu.tw>
Resent-Message-ID: <201305171120.r4HBK11L095672@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         178710
>Category:       ports
>Synopsis:       [PATCH] x11-toolkits/plib: Patch vulnerabilities
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 17 11:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Denny Lin
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD cnmc32.hs.ntnu.edu.tw 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r228819M: Fri Dec 23 08:56:11 CST 2011 root@cnmc32.hs.ntnu.edu.tw:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
Patches for CVE-2011-4620 and CVE-2012-4552. Obtained from https://build.opensuse.org/request/show/144547.
>How-To-Repeat:
	
>Fix:

	

--- plib.patch begins here ---
diff -ruN plib.orig/Makefile plib/Makefile
--- plib.orig/Makefile	2013-05-17 15:40:24.000000000 +0800
+++ plib/Makefile	2013-05-17 15:43:58.000000000 +0800
@@ -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 -ruN plib.orig/files/patch-src-ssg-ssgParser.cxx plib/files/patch-src-ssg-ssgParser.cxx
--- plib.orig/files/patch-src-ssg-ssgParser.cxx	1970-01-01 08:00:00.000000000 +0800
+++ plib/files/patch-src-ssg-ssgParser.cxx	2013-05-17 15:43:10.000000000 +0800
@@ -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 -ruN plib.orig/files/patch-src-util-ulError.cxx plib/files/patch-src-util-ulError.cxx
--- plib.orig/files/patch-src-util-ulError.cxx	1970-01-01 08:00:00.000000000 +0800
+++ plib/files/patch-src-util-ulError.cxx	2013-05-17 15:43:12.000000000 +0800
@@ -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 ) ;
--- plib.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130517111515.61E1E1C643D>