Advertisement
Guest User

Untitled

a guest
May 4th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. From 8cf8940410590fe51ab25a07a2f4176f65a25271 Mon Sep 17 00:00:00 2001
  2. From: abma <spring@abma.de>
  3. Date: Sun, 10 Aug 2014 22:59:35 +0200
  4. Subject: [PATCH] reapply CVE-2009-3994
  5.  
  6. ---
  7. src-IL/src/il_dicom.c | 4 +++-
  8. 1 file changed, 3 insertions(+), 1 deletion(-)
  9.  
  10. diff --git a/src-IL/src/il_dicom.c b/src-IL/src/il_dicom.c
  11. index fbba48c..9fc087d 100644
  12. --- a/src-IL/src/il_dicom.c
  13. +++ b/src-IL/src/il_dicom.c
  14. @@ -427,9 +427,11 @@ ILboolean GetUID(ILubyte *UID)
  15. return IL_FALSE;
  16.  
  17. ValLen = GetLittleUShort();
  18. + if (ValLen > 64)
  19. + return IL_FALSE;
  20. if (iread(UID, ValLen, 1) != 1)
  21. return IL_FALSE;
  22. - UID[64] = 0; // Just to make sure that our string is terminated.
  23. + UID[ValLen] = 0; // Just to make sure that our string is terminated.
  24.  
  25. return IL_TRUE;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement