deutex/deutex-soundbuf.diff

24 lines
936 B
Diff

From: Jan Engelhardt <jengelh@medozas.de>
I: Statement might potentially overflow a destination buffer, where a size
larger than the actual buffer was specified
E: deutex destbufferoverflow src/sound.c:315:11
---
src/sound.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: deutex-4.4.902/src/sound.c
===================================================================
--- deutex-4.4.902.orig/src/sound.c
+++ deutex-4.4.902/src/sound.c
@@ -312,7 +312,7 @@ char *SNDloadVocFile(char *file, Int32
ProgError("VR12", "%s: bad magic", fname (file));
if(fseek(fp,headv.block1,SEEK_SET))
ProgError("VR13", "%s: bad header", fname (file));
- if(fread(&blockv,sizeof(struct VOCHEAD),1,fp)!=1)
+ if(fread(&blockv,sizeof(struct VOCBLOCK1),1,fp)!=1)
ProgError("VR14", "%s: read error in first block", fname (file));
if(blockv.type!=1)
ProgError("VR15", "%s: first block is not sound", fname (file));