lib/dpkg/tarfn.c: Kludge `tar_header_decode' to handle spurious `errno'.
This fixes a curious failure unpacking `gnome-icon-theme' under qemu.
What appears to be happening here is that `m_strndup' (or, more likely,
`malloc' behind it) is setting `errno' to `ENOMEM' while it tries
various approaches to allocating memory. This then confuses the
`if (errno)' check at the end into thinking that the header decoding has
failed when in fact everything is fine.
POSIX appears to allow `malloc', and derived functions, to set `errno'
spuriously in this manner (even though ISO C rules wouldn't given the
POSIX definition of `malloc'), so this is properly a bug in `dpkg'.
This bug is fixed (by accident, apparently) in buster, but the proper
change is hard to backport, so we have this kludge instead.