[PATCH openEuler-5.10-LTS 032/121] hex2bin: fix access beyond string end