[GM-commit] GraphicsMagick: CALS reader, verify that sufficient header data ...
Swiss army knife of image processing
Brought to you by:
bfriesen
From: GraphicsMagick C. <gra...@li...> - 2015-03-28 20:02:37
|
changeset 89f40976466b in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=89f40976466b summary: CALS reader, verify that sufficient header data was read before parsing. diffstat: ChangeLog | 2 ++ coders/cals.c | 3 ++- www/Changelog.html | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diffs (39 lines): diff -r 89392c8d765d -r 89f40976466b ChangeLog --- a/ChangeLog Sat Mar 28 14:54:31 2015 -0500 +++ b/ChangeLog Sat Mar 28 15:02:10 2015 -0500 @@ -3,6 +3,8 @@ * coders/cals.c (ReadCALSImage): Silence Coverity 10086 "Unchecked return value from library". (ReadCALSImage): Silence Coverity 10085 "Unchecked return value". + (ReadCALSImage): Silence Coverity 10084 "Unchecked return value + from library". * magick/enhance.c (ModulateImage): Silence Coverity 10087 "Unchecked return value". diff -r 89392c8d765d -r 89f40976466b coders/cals.c --- a/coders/cals.c Sat Mar 28 14:54:31 2015 -0500 +++ b/coders/cals.c Sat Mar 28 15:02:10 2015 -0500 @@ -187,7 +187,8 @@ record[128]=0; for (y = 0; y < 16; y++) { - ReadBlob(image,128,(char *) record); + if (ReadBlob(image,128,(char *) record) != 128) + break; if (LocaleNCompare(record,"rtype:",6) == 0) { /* rtype */ if (sscanf(record+6,"%ld",&rtype) != 1) diff -r 89392c8d765d -r 89f40976466b www/Changelog.html --- a/www/Changelog.html Sat Mar 28 14:54:31 2015 -0500 +++ b/www/Changelog.html Sat Mar 28 15:02:10 2015 -0500 @@ -40,7 +40,9 @@ <ul class="simple"> <li>coders/cals.c (ReadCALSImage): Silence Coverity 10086 "Unchecked return value from library". -(ReadCALSImage): Silence Coverity 10085 "Unchecked return value".</li> +(ReadCALSImage): Silence Coverity 10085 "Unchecked return value". +(ReadCALSImage): Silence Coverity 10084 "Unchecked return value +from library".</li> <li>magick/enhance.c (ModulateImage): Silence Coverity 10087 "Unchecked return value".</li> </ul> |