aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-03-27 16:17:31 +0000
committerGerald Combs <gerald@wireshark.org>2009-03-27 16:17:31 +0000
commitc12114d6e1564e6ed3fd9fe6675399fe4abbeb5d (patch)
treed848cca5b38aa71b301ef222da76f3a775fe79af /epan/dissectors
parent62f9c749c2ce59ca06da6c92b166c30a9412583d (diff)
More size_t casts.
svn path=/trunk/; revision=27866
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-afs.c2
-rw-r--r--epan/dissectors/packet-ajp13.c4
-rw-r--r--epan/dissectors/packet-bacapp.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/epan/dissectors/packet-afs.c b/epan/dissectors/packet-afs.c
index 61cdb49181..08968ed040 100644
--- a/epan/dissectors/packet-afs.c
+++ b/epan/dissectors/packet-afs.c
@@ -662,7 +662,7 @@ static gint ett_afs_vldb_flags = -1;
who, tmp, positive ? "" : " (negative)"); \
save = tree; \
tree = proto_item_add_subtree(ti, ett_afs_acl); \
- proto_tree_add_string(tree,hf_afs_fs_acl_entity, tvb,offset,strlen(who), who);\
+ proto_tree_add_string(tree,hf_afs_fs_acl_entity, tvb,offset,(int)strlen(who), who);\
tmpoffset = offset + (int)strlen(who) + 1; \
acllen = bytes - (int)strlen(who) - 1; \
proto_tree_add_boolean(tree,hf_afs_fs_acl_r, tvb,tmpoffset,acllen,acl);\
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index cc7eb7f96b..815a113789 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -248,14 +248,14 @@ get_nstring(tvbuff_t *tvb, gint offset, guint8* cbuf, size_t cbuflen)
len = tvb_get_ntohs(tvb, offset);
- if (len == 0xffff) {
+ if (len == 0xffff || cbuflen < 1) {
cbuf[0] = '\0';
len = 0;
} else {
copylen = len;
if (copylen > cbuflen - 1)
copylen = cbuflen - 1;
- tvb_memcpy(tvb, cbuf, offset+2, copylen);
+ tvb_memcpy(tvb, cbuf, offset+2, (gint) copylen);
cbuf[copylen] = '\0';
len++;
}
diff --git a/epan/dissectors/packet-bacapp.c b/epan/dissectors/packet-bacapp.c
index 2fa639f709..78c9eb9994 100644
--- a/epan/dissectors/packet-bacapp.c
+++ b/epan/dissectors/packet-bacapp.c
@@ -6497,7 +6497,7 @@ fConvertXXXtoUTF8 (gchar *in, size_t *inbytesleft, gchar *out, size_t *outbytesl
GIConv icd;
if ((icd = g_iconv_open ("UTF-8", fromcoding)) != (GIConv) -1) {
- i = g_iconv (icd, &in, inbytesleft, &out, outbytesleft);
+ i = (guint32) g_iconv (icd, &in, inbytesleft, &out, outbytesleft);
/* g_iconv incremented 'out'; now ensure it's NULL terminated */
out[0] = '\0';