• R/O
  • SSH

GM: Commit

Main GraphicsMagick source repository


Commit MetaInfo

Revisionb067afcd6aa74d0eee24915a98ccdfc37695dd8f (tree)
Time2022-01-15 06:01:00
AuthorBob Friesenhahn <bfriesen@Grap...>
CommiterBob Friesenhahn

Log Message

Avoid attempts to report multiple ReadLimitExceeded exceptions.

Change Summary

Incremental Difference

diff -r 5e47c783eb86 -r b067afcd6aa7 magick/blob.c
--- a/magick/blob.c Fri Jan 14 08:42:23 2022 -0600
+++ b/magick/blob.c Fri Jan 14 15:01:00 2022 -0600
@@ -279,11 +279,14 @@
279279 blob->read_total += available;
280280 if (available < length)
281281 {
282- blob->eof=True;
283- if (blob->read_limit <= blob->read_total)
282+ if (MagickFalse == blob->eof)
284283 {
285- ThrowException(&image->exception,ResourceLimitError,ReadLimitExceeded,
286- image->filename);
284+ blob->eof=MagickTrue;
285+ if (blob->read_limit <= blob->read_total)
286+ {
287+ ThrowException(&image->exception,ResourceLimitError,ReadLimitExceeded,
288+ image->filename);
289+ }
287290 }
288291 }
289292 return available;
@@ -3367,11 +3370,14 @@
33673370 blob->read_total += count;
33683371 if (count < req_length)
33693372 {
3370- blob->eof=True;
3371- if (blob->read_limit <= blob->read_total)
3373+ if (MagickFalse == blob->eof)
33723374 {
3373- ThrowException(&image->exception,ResourceLimitError,ReadLimitExceeded,
3374- image->filename);
3375+ blob->eof=MagickTrue;
3376+ if (blob->read_limit <= blob->read_total)
3377+ {
3378+ ThrowException(&image->exception,ResourceLimitError,ReadLimitExceeded,
3379+ image->filename);
3380+ }
33753381 }
33763382 }
33773383 return(count);
Show on old repository browser