Fix of a possible buffer overflow