projects
/
platform
/
upstream
/
nasm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9b2d2a
)
disasm.c: eatbyte -- use snprintf to prevent potential buffer overflow
author
Cyrill Gorcunov
<gorcunov@gmail.com>
Sun, 9 Aug 2009 15:25:29 +0000
(19:25 +0400)
committer
H. Peter Anvin
<hpa@zytor.com>
Sun, 9 Aug 2009 17:30:48 +0000
(10:30 -0700)
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>
disasm.c
patch
|
blob
|
history
diff --git
a/disasm.c
b/disasm.c
index
ec145be
..
6a2554b
100644
(file)
--- a/
disasm.c
+++ b/
disasm.c
@@
-1553,7
+1553,7
@@
int32_t eatbyte(uint8_t *data, char *output, int outbufsize, int segsize)
}
if (str)
- s
trcpy(output
, str);
+ s
nprintf(output, outbufsize, "%s"
, str);
return 1;
}