diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-02 17:25:40 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2008-02-02 17:25:40 +0000 |
commit | 677eb18d202d100871dd6b08a18db9dba314ed3b (patch) | |
tree | be5bef5296434902f49f006f350c91544fdda44d /epan/dissectors/packet-srvloc.c | |
parent | f4871e6269b60873a2a82db5f8c88ef8228d9c1b (diff) |
Rewrote some prohibited APIs in epan/dissectors/ (sprintf, strcpy, strcat).
If we get some truncated strings we probably overwrote some buffers...
svn path=/trunk/; revision=24249
Diffstat (limited to 'epan/dissectors/packet-srvloc.c')
-rw-r--r-- | epan/dissectors/packet-srvloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-srvloc.c b/epan/dissectors/packet-srvloc.c index 9a6ae53781..03c40c3ae9 100644 --- a/epan/dissectors/packet-srvloc.c +++ b/epan/dissectors/packet-srvloc.c @@ -560,7 +560,7 @@ attr_list(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length, type_len = strcspn(tmp, ")"); add_v1_string(tree, hf_srvloc_srvrply_svcname, tvb, offset, type_len*2, encoding); offset += (type_len*2)+4; - strcpy(attr_type, "\0"); + attr_type[0] = '\0'; } /* If this is the attribute svcaddr */ if (strcmp(attr_type, "svcaddr-ws")==0) { @@ -625,7 +625,7 @@ attr_list(proto_tree *tree, int hf, tvbuff_t *tvb, int offset, int length, foffset += 57; } offset = foffset; - strcpy(attr_type, "\0"); + attr_type[0] = '\0'; } /* If there are no more supported attributes available then abort dissection */ if (strcmp(attr_type, "svcaddr-ws")!=0 && strcmp(attr_type, "svcname-ws")!=0 && strcmp(attr_type, "\0")!=0) { |