fix: Use `png_voidp` instead of `voidp` in pngread.c and pngwrite.c

A benign type error introduced in libpng-1.0.9beta1 (Nov 2000) went
unnoticed in reviews and testing for nearly 25 years.

The type `voidp` (from zconf.h via zlib.h) is a plain "void pointer".
By contrast, `png_voidp` (from pngconf.h via png.h) was defined as a
"void FAR pointer" on legacy i8086 memory models (MSDOS, OS/2 2.x,
Win16), and as a plain "void pointer" elsewhere. The support for FAR
pointers in mixed-memory models was removed in libpng-1.6.0, which
inadvertently "fixed" the underlying error. However, all libpng
versions from 1.0.9 to 1.5.30 (Nov 2000–Sep 2017) remained broken on
these models; and yet, nobody noticed.

This typo illustrates how long we've been carrying pointer abstraction
baggage without any confirmed benefit.

This is a cherry-pick of commit 0ff384943db3732fe6fe9e132b00eb3373072b41
from branch 'libpng18'.

Reviewed-by: Chris Blume <ProgramMax@gmail.com>
Reviewed-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2 files changed