diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-05-08 05:16:33 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-05-08 05:16:33 +0000 |
commit | ab645edcd9b172e374b2541c239f013db42da99c (patch) | |
tree | eb5566e364265e2626b7c14b7b6db0b0fb1be441 /wiretap/vms.c | |
parent | a95decdda0420f0992caed35558d27494e2d8f7d (diff) |
strncpy -> g_strlcpy
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25254 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/vms.c')
-rw-r--r-- | wiretap/vms.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/wiretap/vms.c b/wiretap/vms.c index 38fbb9e124..f834122897 100644 --- a/wiretap/vms.c +++ b/wiretap/vms.c @@ -174,9 +174,8 @@ static long vms_seek_next_packet(wtap *wth, int *err) if (strstr(buf, VMS_REC_MAGIC_STR1) || strstr(buf, VMS_REC_MAGIC_STR2) || strstr(buf, VMS_REC_MAGIC_STR2)) { - strncpy(hdr, buf, VMS_LINE_LENGTH-1); - hdr[VMS_LINE_LENGTH-1] = '\0'; - return cur_off; + g_strlcpy(hdr, buf,VMS_LINE_LENGTH); + return cur_off; } } else { if (file_eof(wth->fh)) { |