diff options
author | simon <simon@FreeBSD.org> | 2005-01-15 11:47:51 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2005-01-15 11:47:51 +0000 |
commit | 70734d490398feddf35f84fe4d8cf33c408eb6c8 (patch) | |
tree | 915412f156fb6a9e712d4b4c10dddaf203a31189 /audio/mpg123 | |
parent | be29e48256c8fa21a558e69a6c615052be84ba3b (diff) | |
download | FreeBSD-ports-70734d490398feddf35f84fe4d8cf33c408eb6c8.zip FreeBSD-ports-70734d490398feddf35f84fe4d8cf33c408eb6c8.tar.gz |
Fix buffer overflow vulnerability.
VuXML: http://vuxml.FreeBSD.org/3cc84400-6576-11d9-a9e7-0001020eed82.html
Obtained from: Debian
Approved by: maintainer, erwin (mentor)
Diffstat (limited to 'audio/mpg123')
-rw-r--r-- | audio/mpg123/Makefile | 2 | ||||
-rw-r--r-- | audio/mpg123/files/patch-CAN-2004-0991 | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/audio/mpg123/Makefile b/audio/mpg123/Makefile index 0ab03e7..41aacb5 100644 --- a/audio/mpg123/Makefile +++ b/audio/mpg123/Makefile @@ -7,7 +7,7 @@ PORTNAME= mpg123 PORTVERSION= 0.59r -PORTREVISION= 16 +PORTREVISION= 17 CATEGORIES= audio ipv6 MASTER_SITES= http://www.mpg123.de/mpg123/ \ http://www-ti.informatik.uni-tuebingen.de/~hippm/mpg123/ diff --git a/audio/mpg123/files/patch-CAN-2004-0991 b/audio/mpg123/files/patch-CAN-2004-0991 new file mode 100644 index 0000000..4269a17 --- /dev/null +++ b/audio/mpg123/files/patch-CAN-2004-0991 @@ -0,0 +1,30 @@ +--- common.c.orig 2003/01/29 19:22:48 1.4 ++++ common.c 2005/01/01 19:21:47 1.5 +@@ -343,9 +343,12 @@ + fr->mpeg25 = 1; + } + +- if (!param.tryresync || !oldhead) { +- /* If "tryresync" is true, assume that certain +- parameters do not change within the stream! */ ++ if (!param.tryresync || !oldhead || ++ (((oldhead>>19)&0x3) ^ ((newhead>>19)&0x3))) { ++ /* If "tryresync" is false, assume that certain ++ parameters do not change within the stream! ++ Force an update if lsf or mpeg25 settings ++ have changed. */ + fr->lay = 4-((newhead>>17)&3); + if( ((newhead>>10)&0x3) == 0x3) { + fprintf(stderr,"Stream error\n"); +Index: debian/mpg123/layer2.c +--- layer2.c.orig Tue Sep 7 14:32:13 2004 ++++ layer2.c Sat Jan 1 20:21:47 2005 +@@ -240,7 +240,7 @@ + { alloc_0, alloc_1, alloc_2, alloc_3 , alloc_4 }; + static int sblims[5] = { 27 , 30 , 8, 12 , 30 }; + +- if(fr->lsf) ++ if(fr->sampling_frequency >= 3) /* Or equivalent: (fr->lsf == 1) */ + table = 4; + else + table = translate[fr->sampling_frequency][2-fr->stereo][fr->bitrate_index]; |