Merge pull request #372 from Pan7/fixlwo

Fix for potentially using uninitialized variable
This commit is contained in:
Timothee "TTimo" Besset 2017-01-01 08:24:28 -06:00 committed by GitHub
commit a6d10074b7
2 changed files with 7 additions and 0 deletions

View file

@ -75,6 +75,8 @@ lwEnvelope *lwGetEnvelope( picoMemStream_t *fp, int cksize ){
goto Fail;
}
key = NULL;
/* process subchunks as they're encountered */
while ( 1 ) {

View file

@ -244,6 +244,8 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
goto Fail;
}
shdr = NULL;
/* process subchunks as they're encountered */
while ( 1 ) {
@ -494,6 +496,9 @@ lwSurface *lwGetSurface5( picoMemStream_t *fp, int cksize, lwObject *obj ){
break;
case ID_SDAT:
if ( !shdr ) {
goto Fail;
}
shdr->data = getbytes( fp, sz );
break;