From 0a45cc8ce8ae3451a7cff45c3947dbc631f1ddad Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 9 Aug 2009 19:25:29 +0400 Subject: 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 Signed-off-by: H. Peter Anvin --- disasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disasm.c b/disasm.c index ec145be..6a2554b 100644 --- a/disasm.c +++ b/disasm.c @@ -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; } -- cgit v1.2.3