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