You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-libs/devil/files/devil-1.7.8-CVE-2009-3994.p...

18 lines
447 B

http://bugs.gentoo.org/297760
--- a/src-IL/src/il_dicom.c
+++ b/src-IL/src/il_dicom.c
@@ -427,9 +427,11 @@ ILboolean GetUID(ILubyte *UID)
return IL_FALSE;
ValLen = GetLittleUShort();
+ if (ValLen > 64)
+ return IL_FALSE;
if (iread(UID, ValLen, 1) != 1)
return IL_FALSE;
- UID[64] = 0; // Just to make sure that our string is terminated.
+ UID[ValLen] = 0; // Just to make sure that our string is terminated.
return IL_TRUE;
}