More bug reports

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
maksqwe
Posts: 5
Joined: 2014-04-04T09:18:50-07:00
Authentication code: 6789

More bug reports

Post by maksqwe »

- typo
xml-tree.c 2564
char *XMLTreeTagToXML(XMLTreeInfo *xml_info,char **source,size_t *length, size_t *extent,size_t start,char ***attributes)

Code: Select all

*source=(char *) ResizeQuantumMemory(*source,*extent,sizeof(*source)); // should be sizeof(**source)
-----------------------------------------------
possible single-byte overflow on Windows
nt-base.c 1560
nt-base.c 1571

Code: Select all

if(wcsncat(file_specification,(const wchar_t*) DirectorySeparator,  MaxTextExtent) == (wchar_t*)NULL)
strncat() copies up to n chars and then appends a \0, thus writing a total of n+1 bytes. The supplied value for n should be "sizeof(strbuf) - strlen(strbuf) - 1".

Code: Select all

if(wcsncat(file_specification,(const wchar_t*) DirectorySeparator,  MaxTextExtent - wcslen(file_specification) - 1) == (wchar_t*)NULL)
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: More bug reports

Post by dlemstra »

Fixed, you can just reply to this post if you find more.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
maksqwe
Posts: 5
Joined: 2014-04-04T09:18:50-07:00
Authentication code: 6789

Re: More bug reports

Post by maksqwe »

One more :)

fits.c 310

(void) ResetMagickMemory(&fits_info,0,sizeof(fits_info));
fits_info.extend=MagickFalse;
fits_info.simple=MagickFalse;
fits_info.bits_per_pixel=8;
fits_info.columns=1;
fits_info.rows=1; // <==
fits_info.rows=1; // <==
fits_info.number_planes=1;
fits_info.min_data=0.0;
fits_info.max_data=0.0;
fits_info.zero=0.0;
fits_info.scale=1.0;
fits_info.endian=MSBEndian;

fits_info.number_axes is missing
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: More bug reports

Post by dlemstra »

Should it not be initialized at zero?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
maksqwe
Posts: 5
Joined: 2014-04-04T09:18:50-07:00
Authentication code: 6789

Re: More bug reports

Post by maksqwe »

Should it not be initialized at zero?
Yes, I see. "ResetMagickMemory(&fits_info,0,sizeof(fits_info));"
Therefore this is harmless double assignment only.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: More bug reports

Post by magick »

We'll remove the double assignment in ImageMagick 6.9.1-5 Beta, available by sometime tomorrow.
Post Reply