aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-windows-common.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2005-06-01 19:17:59 +0000
committerUlf Lamping <ulf.lamping@web.de>2005-06-01 19:17:59 +0000
commitbb4e980df1566b2545471c4ffcdc49329cc070d2 (patch)
tree6b47c7460420c76ba6ae2d68c57f45929222ef03 /epan/dissectors/packet-windows-common.c
parent9afc2ed9955125a34b147d1dc2c4f2ef4e57a36e (diff)
bugfix: use g_snprintf instead of sprintf to prevent a buffer overflow
svn path=/trunk/; revision=14515
Diffstat (limited to 'epan/dissectors/packet-windows-common.c')
-rw-r--r--epan/dissectors/packet-windows-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-windows-common.c b/epan/dissectors/packet-windows-common.c
index cb6996a04c..a56a46e416 100644
--- a/epan/dissectors/packet-windows-common.c
+++ b/epan/dissectors/packet-windows-common.c
@@ -1313,10 +1313,10 @@ dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree, char *name,
rid_present=TRUE;
rid_offset=offset;
offset+=4;
- sprintf(sid_string, "S-1-%u-%s-%u", auth, gstr->str, rid);
+ g_snprintf(sid_string, sizeof(sid_string), "S-1-%u-%s-%u", auth, gstr->str, rid);
} else {
rid_present=FALSE;
- sprintf(sid_string, "S-1-%u-%s", auth, gstr->str);
+ g_snprintf(sid_string, sizeof(sid_string), "S-1-%u-%s", auth, gstr->str);
}
sid_name=NULL;