diff options
author | cmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-11 13:38:32 +0000 |
---|---|---|
committer | cmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-04-11 13:38:32 +0000 |
commit | 2350159400ceea2a761cc76714aca7282641d66a (patch) | |
tree | 200e9259139424c060424faf9ee3aed98456f7cb /epan | |
parent | 642916e2c75b969d18836b7c5b8074d593afdd63 (diff) |
Use g_strlcpy() instead of prohibited strncpy() to guarantee NULL-termination.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@36553 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r-- | epan/proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index 3c7f334a50..90bdebf2b6 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -3970,7 +3970,7 @@ proto_item_prepend_text(proto_item *pi, const char *format, ...) proto_item_fill_label(fi, fi->rep->representation); } - strncpy(representation, fi->rep->representation, ITEM_LABEL_LENGTH); + g_strlcpy(representation, fi->rep->representation, ITEM_LABEL_LENGTH); va_start(ap, format); g_vsnprintf(fi->rep->representation, ITEM_LABEL_LENGTH, format, ap); |