]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 18 Apr 2013 19:19:01 +0000 (19:19 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 18 Apr 2013 19:19:01 +0000 (19:19 +0000)
MagickCore/utility.c

index e6c8396fc63098a4eefa4d6c616efeccbe0d2536..dcc58db750b5b2fa430cff112e07c6cd8c75889e 100644 (file)
@@ -1844,13 +1844,13 @@ MagickPrivate MagickBooleanType ShredFile(const char *path)
     if (lseek(file,0,SEEK_SET) < 0)
       break;
     random_info=AcquireRandomInfo();
-    for (j=0; j < length; j+=count)
+    for (j=0; j < (ssize_t) length; j+=count)
     {
       StringInfo
         *key;
 
       key=GetRandomKey(random_info,quantum);
-      if (j == 0)
+      if (i == 0)
         ResetStringInfo(key);  /* zero on first pass */
       count=write(file,GetStringInfoDatum(key),(size_t)
         MagickMin(quantum,length-j));