avcodec/pnm_parser: Use memmove() to handle "overread"