Hi, we are getting a compiler warning due to these lines in pngset.c
(v1.2.19)
688 new_iccp_name =3D (png_charp)png_malloc_warn(png_ptr,
png_strlen(name)+1);
...
694 png_strncpy(new_iccp_name, name, png_sizeof(new_iccp_name));
^^^^^^^^^^^^^^^^^^^^^^^^^
Since `new_iccp_name' is a pointer (not an array), the sizeof() will
return 4 or 8 depending on the size of a pointer. It seems unlikely
that was intended. I think the sizeof(...) should instead be
png_strlen(name)+1
There is a related issue with:
984 png_strncpy(to->name, from->name,
png_strlen(from->name));
I think that should be strlen(...)+1 so that to->name will be
nul-terminated.
Thanks much for looking into this,
Jeff Phillips
|