Skip to content

Commit 28ad2e8

Browse files
committed
libvorbis: Sync with upstream 1.3.7
Fixes various bugs, including several ones with security relevance. Changes: https://github.com/xiph/vorbis/releases/tag/v1.3.7
1 parent 42f8bfa commit 28ad2e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+136
-114
lines changed

Diff for: thirdparty/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,14 @@ on top of the 1.1.1 source (not included in any stable release yet).
279279
## libvorbis
280280

281281
- Upstream: https://www.xiph.org/vorbis
282-
- Version: 1.3.6 (2018)
282+
- Version: 1.3.7 (0657aee69dec8508a0011f47f3b69d7538e9d262, 2020)
283283
- License: BSD-3-Clause
284284

285285
Files extracted from upstream source:
286286

287-
- `src/*` except from: `lookups.pl`, `Makefile.*`
288-
- `include/vorbis/*.h` as vorbis/
289-
- COPYING
287+
- `lib/*` except from: `lookups.pl`, `Makefile.*`
288+
- `include/vorbis/*.h` as `vorbis/`
289+
- `COPYING`
290290

291291

292292
## libwebp

Diff for: thirdparty/libvorbis/COPYING

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2002-2018 Xiph.org Foundation
1+
Copyright (c) 2002-2020 Xiph.org Foundation
22

33
Redistribution and use in source and binary forms, with or without
44
modification, are permitted provided that the following conditions

Diff for: thirdparty/libvorbis/analysis.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/backends.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/barkmel.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/bitrate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/bitrate.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/block.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/books/coupled/res_books_51.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212
*

Diff for: thirdparty/libvorbis/books/coupled/res_books_stereo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/books/floor/floor_books.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/books/uncoupled/res_books_uncoupled.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/codebook.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/codebook.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/codec_internal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/envelope.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/envelope.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/floor0.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/floor1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/highlevel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/info.c

+15-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212
@@ -19,7 +19,6 @@
1919

2020
#include <stdlib.h>
2121
#include <string.h>
22-
#include <ctype.h>
2322
#include <ogg/ogg.h>
2423
#include "vorbis/codec.h"
2524
#include "codec_internal.h"
@@ -30,8 +29,8 @@
3029
#include "misc.h"
3130
#include "os.h"
3231

33-
#define GENERAL_VENDOR_STRING "Xiph.Org libVorbis 1.3.6"
34-
#define ENCODE_VENDOR_STRING "Xiph.Org libVorbis I 20180316 (Now 100% fewer shells)"
32+
#define GENERAL_VENDOR_STRING "Xiph.Org libVorbis 1.3.7"
33+
#define ENCODE_VENDOR_STRING "Xiph.Org libVorbis I 20200704 (Reducing Environment)"
3534

3635
/* helpers */
3736
static void _v_writestring(oggpack_buffer *o,const char *s, int bytes){
@@ -47,6 +46,10 @@ static void _v_readstring(oggpack_buffer *o,char *buf,int bytes){
4746
}
4847
}
4948

49+
static int _v_toupper(int c) {
50+
return (c >= 'a' && c <= 'z') ? (c & ~('a' - 'A')) : c;
51+
}
52+
5053
void vorbis_comment_init(vorbis_comment *vc){
5154
memset(vc,0,sizeof(*vc));
5255
}
@@ -78,7 +81,7 @@ void vorbis_comment_add_tag(vorbis_comment *vc, const char *tag, const char *con
7881
static int tagcompare(const char *s1, const char *s2, int n){
7982
int c=0;
8083
while(c < n){
81-
if(toupper(s1[c]) != toupper(s2[c]))
84+
if(_v_toupper(s1[c]) != _v_toupper(s2[c]))
8285
return !0;
8386
c++;
8487
}
@@ -203,6 +206,7 @@ void vorbis_info_clear(vorbis_info *vi){
203206

204207
static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
205208
codec_setup_info *ci=vi->codec_setup;
209+
int bs;
206210
if(!ci)return(OV_EFAULT);
207211

208212
vi->version=oggpack_read(opb,32);
@@ -215,8 +219,12 @@ static int _vorbis_unpack_info(vorbis_info *vi,oggpack_buffer *opb){
215219
vi->bitrate_nominal=(ogg_int32_t)oggpack_read(opb,32);
216220
vi->bitrate_lower=(ogg_int32_t)oggpack_read(opb,32);
217221

218-
ci->blocksizes[0]=1<<oggpack_read(opb,4);
219-
ci->blocksizes[1]=1<<oggpack_read(opb,4);
222+
bs = oggpack_read(opb,4);
223+
if(bs<0)goto err_out;
224+
ci->blocksizes[0]=1<<bs;
225+
bs = oggpack_read(opb,4);
226+
if(bs<0)goto err_out;
227+
ci->blocksizes[1]=1<<bs;
220228

221229
if(vi->rate<1)goto err_out;
222230
if(vi->channels<1)goto err_out;

Diff for: thirdparty/libvorbis/lookup.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/lookup.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/lookup_data.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/lpc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/lpc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/lsp.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212
@@ -15,9 +15,10 @@
1515
The LSP generation code is taken (with minimal modification and a
1616
few bugfixes) from "On the Computation of the LSP Frequencies" by
1717
Joseph Rothweiler (see http://www.rothweiler.us for contact info).
18+
1819
The paper is available at:
1920
20-
http://www.myown1.com/joe/lsf
21+
https://web.archive.org/web/20110810174000/http://home.myfairpoint.net/vzenxj75/myown1/joe/lsf/index.html
2122
2223
********************************************************************/
2324

Diff for: thirdparty/libvorbis/lsp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/mapping0.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2010 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/masking.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/mdct.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/mdct.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/misc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2015 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/modes/floor_all.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

Diff for: thirdparty/libvorbis/modes/psych_11.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
77
* *
88
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
9-
* by the Xiph.Org Foundation http://www.xiph.org/ *
9+
* by the Xiph.Org Foundation https://xiph.org/ *
1010
* *
1111
********************************************************************
1212

0 commit comments

Comments
 (0)