The issue is related to a stack-based buffer overflow in the WritePNMImage function, located in coders/pnm.c, due to a misplaced strncpy and an off-by-one error. This can be exploited by a remote attacker using a specially crafted image, potentially leading to a denial of service or the execution of arbitrary code.