From owner-freebsd-ports-bugs@FreeBSD.ORG Fri May 17 11:20:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4068057B for ; Fri, 17 May 2013 11:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 215733FF for ; Fri, 17 May 2013 11:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r4HBK1gi095673 for ; Fri, 17 May 2013 11:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r4HBK11L095672; Fri, 17 May 2013 11:20:01 GMT (envelope-from gnats) Resent-Date: Fri, 17 May 2013 11:20:01 GMT Resent-Message-Id: <201305171120.r4HBK11L095672@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Denny Lin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1B8B553C for ; Fri, 17 May 2013 11:15:24 +0000 (UTC) (envelope-from dennylin93@hs.ntnu.edu.tw) Received: from mail.hs.ntnu.edu.tw (mail.hs.ntnu.edu.tw [140.131.149.3]) by mx1.freebsd.org (Postfix) with ESMTP id AB7413D9 for ; Fri, 17 May 2013 11:15:23 +0000 (UTC) Received: by mail.hs.ntnu.edu.tw (Postfix, from userid 1001) id 61E1E1C643D; Fri, 17 May 2013 19:15:15 +0800 (CST) Message-Id: <20130517111515.61E1E1C643D@mail.hs.ntnu.edu.tw> Date: Fri, 17 May 2013 19:15:15 +0800 (CST) From: Denny Lin To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/178710: [PATCH] x11-toolkits/plib: Patch vulnerabilities X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Denny Lin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 May 2013 11:20:02 -0000 >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: