summaryrefslogtreecommitdiff
path: root/listing.c
diff options
context:
space:
mode:
authorEd Beroset <beroset@mindspring.com>2004-12-15 18:03:20 +0000
committerEd Beroset <beroset@mindspring.com>2004-12-15 18:03:20 +0000
commitfcc50aec8a16a881f1679843d64ca21acaf82cac (patch)
tree87487d9a8a6d6daf0f2a205cb07cd874fa15ad91 /listing.c
parent83b2809a03743310b4f44ab2d135776708ee9b25 (diff)
downloadnasm-fcc50aec8a16a881f1679843d64ca21acaf82cac.tar.gz
nasm-fcc50aec8a16a881f1679843d64ca21acaf82cac.tar.bz2
nasm-fcc50aec8a16a881f1679843d64ca21acaf82cac.zip
changed sprintf to more secure snprintf to prevent vulnerability to buffer
overflow exploits.
Diffstat (limited to 'listing.c')
-rw-r--r--listing.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/listing.c b/listing.c
index d72450d..5deea2a 100644
--- a/listing.c
+++ b/listing.c
@@ -192,7 +192,7 @@ static void list_output (long offset, const void *data, unsigned long type)
else if (typ == OUT_RESERVE)
{
char q[20];
- sprintf(q, "<res %08lX>", size);
+ snprintf(q, sizeof(q), "<res %08lX>", size);
list_out (offset, q);
}
}