Ignore:
Timestamp:
02/29/12 20:41:19 (2 years ago)
Author:
cristy
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ImageMagick/branches/ImageMagick-6.7.5/magick/profile.c

    r6994 r6998  
    66266626    number_entries; 
    66276627 
     6628  SplayTreeInfo 
     6629    *exif_resources; 
     6630 
    66286631  ssize_t 
    66296632    id, 
     
    66876690  level=0; 
    66886691  entry=0; 
     6692  exif_resources=NewSplayTree((int (*)(const void *,const void *)) NULL, 
     6693    (void *(*)(void *)) NULL,(void *(*)(void *)) NULL); 
    66896694  do 
    66906695  { 
     
    67166721 
    67176722      q=(unsigned char *) (directory+2+(12*entry)); 
     6723      if (GetValueFromSplayTree(exif_resources,q) == q) 
     6724        break; 
     6725      (void) AddValueToSplayTree(exif_resources,q,q); 
    67186726      tag_value=(ssize_t) ReadProfileShort(endian,q); 
    67196727      format=(ssize_t) ReadProfileShort(endian,q+2); 
     
    67336741          */ 
    67346742          offset=(ssize_t) ((int) ReadProfileLong(endian,q+8)); 
     6743          if ((offset+number_bytes) < offset) 
     6744            continue;  /* prevent overflow */ 
    67356745          if ((size_t) (offset+number_bytes) > length) 
    67366746            continue; 
    6737           if (~length < number_bytes) 
    6738             continue;  /* prevent overflow */ 
    67396747          p=(unsigned char *) (exif+offset); 
    67406748        } 
     
    67986806    } 
    67996807  } while (level > 0); 
     6808  exif_resources=DestroySplayTree(exif_resources); 
    68006809  return(MagickTrue); 
    68016810} 
Note: See TracChangeset for help on using the changeset viewer.