]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 5 May 2010 01:21:43 +0000 (01:21 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 5 May 2010 01:21:43 +0000 (01:21 +0000)
coders/cin.c
magick/geometry.c
magick/utility.c
magick/xml-tree.c

index 26442fc3a9a7658bbaa851abc3da8879cf9a343a..227f5f8432c187f050a6bfbf5d2677fda4a59e4b 100644 (file)
@@ -631,15 +631,15 @@ static Image *ReadCINImage(const ImageInfo *image_info,
       */
       cin.film.id=ReadBlobByte(image);
       offset++;
-      if ((unsigned long) cin.film.id != ~0UL)
+      if (((unsigned long) cin.film.id) != ~0UL)
         (void) FormatImageProperty(image,"cin:film.id","%d",cin.film.id);
       cin.film.type=ReadBlobByte(image);
       offset++;
-      if ((unsigned long) cin.film.type != ~0UL)
+      if (((unsigned long) cin.film.type) != ~0UL)
         (void) FormatImageProperty(image,"cin:film.type","%d",cin.film.type);
       cin.film.offset=ReadBlobByte(image);
       offset++;
-      if ((unsigned long) cin.film.offset != ~0UL)
+      if (((unsigned long) cin.film.offset) != ~0UL)
         (void) FormatImageProperty(image,"cin:film.offset","%d",
           cin.film.offset);
       cin.film.reserve1=ReadBlobByte(image);
index 1ea9218a8e397bc81a88bb5188ef947e36097da5..7c1175651107713da9ff7405416b8fb8c024b73f 100644 (file)
@@ -112,7 +112,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,long *x,long *y,
         (void) CopyMagickString(p,p+1,MaxTextExtent);
         continue;
       }
-    switch (*p)
+    switch ((int) *p)
     {
       case '%':
       {
@@ -191,7 +191,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,long *x,long *y,
   value=strtod(p,&q);
   if (LocaleNCompare(p,"0x",2) == 0)
     value=(double) strtol(p,&q,10);
-  if (((int) *q == -41) || (*q == 'x') || (*q == 'X') || (*q == '\0'))
+  if ((((int) *q) == -41) || (*q == 'x') || (*q == 'X') || (*q == '\0'))
     {
       /*
         Parse width.
@@ -204,7 +204,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,long *x,long *y,
       if (p != q)
         flags|=WidthValue;
     }
-  if (((int) *p == -41) || (*p == 'x') || (*p == 'X'))
+  if ((((int) *p) == -41) || (*p == 'x') || (*p == 'X'))
     {
       p++;
       if ((*p != '+') && (*p != '-'))
@@ -732,7 +732,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
         (void) CopyMagickString(p,p+1,MaxTextExtent);
         continue;
       }
-    switch (*p)
+    switch ((int) *p)
     {
       case '%':
       {
@@ -818,7 +818,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
   value=strtod(p,&q);
   if (LocaleNCompare(p,"0x",2) == 0)
     value=(double) strtol(p,&q,10);
-  if (((int) *q == -41) || (*q == 'x') || (*q == 'X') || (*q == ',') ||
+  if ((((int) *q) == -41) || (*q == 'x') || (*q == 'X') || (*q == ',') ||
       (*q == '/') || (*q == ':') || (*q =='\0'))
     {
       /*
@@ -836,7 +836,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
         }
     }
   q=p;
-  if (((int) *p == -41) || (*p == 'x') || (*p == 'X') || (*p == ',') ||
+  if ((((int) *p) == -41) || (*p == 'x') || (*p == 'X') || (*p == ',') ||
       (*p == '/') || (*p == ':'))
     {
       /*
@@ -845,7 +845,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
       p++;
       while (isspace((int) ((unsigned char) *p)) != 0)
         p++;
-      if ((((int) *q != -41) && (*q != 'x') && (*q != 'X')) ||
+      if (((((int) *q) != -41) && (*q != 'x') && (*q != 'X')) ||
           ((*p != '+') && (*p != '-')))
         {
           q=p;
index aa93c3d4bac2f6c1539c7c64e1f60e326be3895f..e6a128ab63a117ad6ceee0bfbb198469a0b02ebd 100644 (file)
@@ -822,7 +822,7 @@ MagickExport MagickBooleanType ExpandFilenames(int *number_arguments,
           MaxTextExtent);
       (void) ConcatenateMagickString(filename,filelist[j],MaxTextExtent);
       filelist[j]=DestroyString(filelist[j]);
-      if (strlen(filename) >= MaxTextExtent)
+      if (strlen(filename) >= (MaxTextExtent-1))
         ThrowFatalException(OptionFatalError,"FilenameTruncated");
       if (IsPathDirectory(filename) <= 0)
         {
index f197d39aacd4a54df450dfa0065027236ac63bfc..cd7fb235c985aa59d7e4fefd213b9c0d5910e3ac 100644 (file)
@@ -1767,7 +1767,7 @@ MagickExport XMLTreeInfo *NewXMLTree(const char *xml,ExceptionInfo *exception)
     attributes=(char **) sentinel;
     tag=p;
     if ((isalpha((int) ((unsigned char) *p)) !=0) || (*p == '_') ||
-        (*p == ':') || (*p < '\0'))
+        (*p == ':') || (((int) *p) < '\0'))
       {
         /*
           Tag.