main: fix two one-byte overreads in header_value()