The png_set_text_2 function in libpng 0.71 before 1.0.67, 1.2.x before 1.2.57, 1.4.x before 1.4.20, 1.5.x before 1.5.28, and 1.6.x before 1.6.27 allows context-dependent attackers to cause a NULL pointer dereference vectors involving loading a text chunk into a png structure, removing the text, and then adding another text chunk to the structure.
https://usn.ubuntu.com/3712-2/
https://usn.ubuntu.com/3712-1/
https://security.gentoo.org/glsa/201701-74
http://www.securityfocus.com/bid/95157