summaryrefslogtreecommitdiff
blob: a9d33d0d0595086828ffa43e6f393b92e447cf08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
===================================================================
RCS file: /GraphicsMagick/GraphicsMagick/coders/dcm.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -p -r1.133 -r1.134
--- GraphicsMagick/coders/dcm.c	2005/09/23 22:32:22	1.133
+++ GraphicsMagick/coders/dcm.c	2006/11/02 14:23:28	1.134
@@ -3022,7 +3022,7 @@ static Image *ReadDCMImage(const ImageIn
             /*
               Photometric interpretation.
             */
-            for (i=0; i < (long) length; i++)
+            for (i=0; i < (long) Min(length, MaxTextExtent-1); i++)
               photometric[i]=data[i];
             photometric[i]='\0';
             break;