mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-28 08:22:56 +02:00
plib: fix CVE-2011-4620 CVE-2012-4552
This commit is contained in:
parent
a5adaf7c5d
commit
feeead05d7
3 changed files with 73 additions and 7 deletions
11
srcpkgs/plib/patches/CVE-2011-4620.diff
Normal file
11
srcpkgs/plib/patches/CVE-2011-4620.diff
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- src/util/ulError.cxx
|
||||||
|
+++ src/util/ulError.cxx
|
||||||
|
@@ -39,7 +39,7 @@
|
||||||
|
{
|
||||||
|
va_list argp;
|
||||||
|
va_start ( argp, fmt ) ;
|
||||||
|
- vsprintf ( _ulErrorBuffer, fmt, argp ) ;
|
||||||
|
+ vsnprintf ( _ulErrorBuffer, sizeof(_ulErrorBuffer), fmt, argp ) ;
|
||||||
|
va_end ( argp ) ;
|
||||||
|
|
||||||
|
if ( _ulErrorCB )
|
55
srcpkgs/plib/patches/CVE-2012-4552.diff
Normal file
55
srcpkgs/plib/patches/CVE-2012-4552.diff
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
diff -up plib-1.8.5/src/ssg/ssgParser.cxx~ plib-1.8.5/src/ssg/ssgParser.cxx
|
||||||
|
--- src/ssg/ssgParser.cxx~ 2008-03-11 03:06:23.000000000 +0100
|
||||||
|
+++ src/ssg/ssgParser.cxx 2012-11-01 15:33:12.424483374 +0100
|
||||||
|
@@ -57,18 +57,16 @@ 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), format, argp );
|
||||||
|
va_end( argp );
|
||||||
|
|
||||||
|
- 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 +76,16 @@ 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), format, argp );
|
||||||
|
va_end( argp );
|
||||||
|
|
||||||
|
- 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.
|
|
@ -1,16 +1,16 @@
|
||||||
# Template build file for 'plib'
|
# Template file for 'plib'
|
||||||
pkgname=plib
|
pkgname=plib
|
||||||
version=1.8.5
|
version=1.8.5
|
||||||
revision=5
|
revision=6
|
||||||
build_style=gnu-configure
|
|
||||||
configure_args="--enable-shared --disable-static"
|
configure_args="--enable-shared --disable-static"
|
||||||
|
build_style=gnu-configure
|
||||||
|
hostmakedepends="autoconf automake libtool"
|
||||||
|
makedepends="MesaLib-devel libX11-devel libXi-devel libXmu-devel"
|
||||||
short_desc="Suite of Portable Game Libraries"
|
short_desc="Suite of Portable Game Libraries"
|
||||||
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
maintainer="Enno Boland <gottox@voidlinux.eu>"
|
||||||
license="LGPL-2"
|
license="LGPL-2.0-or-later"
|
||||||
homepage="http://plib.sourceforge.net"
|
homepage="http://plib.sourceforge.net"
|
||||||
distfiles="http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz"
|
distfiles="http://plib.sourceforge.net/dist/plib-${version}.tar.gz"
|
||||||
makedepends="MesaLib-devel libX11-devel libXi-devel libXmu-devel"
|
|
||||||
hostmakedepends="autoconf automake libtool"
|
|
||||||
checksum=485b22bf6fdc0da067e34ead5e26f002b76326f6371e2ae006415dea6a380a32
|
checksum=485b22bf6fdc0da067e34ead5e26f002b76326f6371e2ae006415dea6a380a32
|
||||||
|
|
||||||
pre_configure() {
|
pre_configure() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue