1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

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.

(cherry picked from commit 77efd406bf)
This commit is contained in:
Rémi Verschelde
2021-11-19 12:32:07 +01:00
parent 31dbc59c39
commit 6b04e3e3f0
3 changed files with 24 additions and 6 deletions

View File

@@ -597,9 +597,14 @@ char *ogg_sync_buffer(ogg_sync_state *oy, long size){
if(size>oy->storage-oy->fill){
/* We need to extend the internal buffer */
long newsize=size+oy->fill+4096; /* an extra page to be nice */
long newsize;
void *ret;
if(size>INT_MAX-4096-oy->fill){
ogg_sync_clear(oy);
return NULL;
}
newsize=size+oy->fill+4096; /* an extra page to be nice */
if(oy->data)
ret=_ogg_realloc(oy->data,newsize);
else
@@ -1564,7 +1569,7 @@ void test_pack(const int *pl, const int **headers, int byteskip,
byteskipcount=byteskip;
}
ogg_sync_wrote(&oy,next-buf);
ogg_sync_wrote(&oy,(long)(next-buf));
while(1){
int ret=ogg_sync_pageout(&oy,&og_de);