disasm.c: eatbyte -- use snprintf to prevent potential buffer overflow

At moment we can't overrun buffer even if we would like to
but better to stay on a safe side and use snprintf.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
Cyrill Gorcunov 2009-08-09 19:25:29 +04:00 committed by H. Peter Anvin
parent c9b2d2a8ec
commit 0a45cc8ce8

View File

@ -1553,7 +1553,7 @@ int32_t eatbyte(uint8_t *data, char *output, int outbufsize, int segsize)
}
if (str)
strcpy(output, str);
snprintf(output, outbufsize, "%s", str);
return 1;
}