From: cristy Date: Thu, 18 Apr 2013 19:19:01 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3849 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=689d9855419aa8be797e93a171cfd54666172137;p=imagemagick --- diff --git a/MagickCore/utility.c b/MagickCore/utility.c index e6c8396fc..dcc58db75 100644 --- a/MagickCore/utility.c +++ b/MagickCore/utility.c @@ -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));