Skip to content

Commit 77efd40

Browse files
committed
libogg: Update to upstream 1.3.5
Mostly a cosmetic update, we were already on a commit close to what ended up being tagged as 1.3.5. Adds an extra buffer overflow fix.
1 parent 42f8bfa commit 77efd40

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

Diff for: thirdparty/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ Files extracted from upstream source:
235235
## libogg
236236

237237
- Upstream: https://www.xiph.org/ogg
238-
- Version: git (c8fca6b4a02d695b1ceea39b330d4406001c03ed, 2019)
238+
- Version: 1.3.5 (e1774cd77f471443541596e09078e78fdc342e4f, 2021)
239239
- License: BSD-3-Clause
240240

241241
Files extracted from upstream source:
242242

243243
- `src/*.{c,h}`
244-
- `include/ogg/*.h` in ogg/
245-
- COPYING
244+
- `include/ogg/*.h` in `ogg/` (run `configure` to generate `config_types.h`)
245+
- `COPYING`
246246

247247

248248
## libpng

Diff for: thirdparty/libogg/framing.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -597,9 +597,14 @@ char *ogg_sync_buffer(ogg_sync_state *oy, long size){
597597

598598
if(size>oy->storage-oy->fill){
599599
/* We need to extend the internal buffer */
600-
long newsize=size+oy->fill+4096; /* an extra page to be nice */
600+
long newsize;
601601
void *ret;
602602

603+
if(size>INT_MAX-4096-oy->fill){
604+
ogg_sync_clear(oy);
605+
return NULL;
606+
}
607+
newsize=size+oy->fill+4096; /* an extra page to be nice */
603608
if(oy->data)
604609
ret=_ogg_realloc(oy->data,newsize);
605610
else
@@ -1564,7 +1569,7 @@ void test_pack(const int *pl, const int **headers, int byteskip,
15641569
byteskipcount=byteskip;
15651570
}
15661571

1567-
ogg_sync_wrote(&oy,next-buf);
1572+
ogg_sync_wrote(&oy,(long)(next-buf));
15681573

15691574
while(1){
15701575
int ret=ogg_sync_pageout(&oy,&og_de);

Diff for: thirdparty/libogg/ogg/config_types.h

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
#ifndef __CONFIG_TYPES_H__
22
#define __CONFIG_TYPES_H__
33

4-
#include <stdint.h>
4+
/* these are filled in by configure or cmake*/
5+
#define INCLUDE_INTTYPES_H 1
6+
#define INCLUDE_STDINT_H 1
7+
#define INCLUDE_SYS_TYPES_H 1
8+
9+
#if INCLUDE_INTTYPES_H
10+
# include <inttypes.h>
11+
#endif
12+
#if INCLUDE_STDINT_H
13+
# include <stdint.h>
14+
#endif
15+
#if INCLUDE_SYS_TYPES_H
16+
# include <sys/types.h>
17+
#endif
518

619
typedef int16_t ogg_int16_t;
720
typedef uint16_t ogg_uint16_t;

0 commit comments

Comments
 (0)