summaryrefslogtreecommitdiff
path: root/epan/req_resp_hdrs.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-10-01 14:38:37 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-10-01 14:38:37 +0000
commit9a0714cfed522249a408ddcb90574f6119a54a21 (patch)
treed896b6c8094939db96358c99b438430945ae3969 /epan/req_resp_hdrs.c
parent8537091ce8c4c192289411d5af87781b56814457 (diff)
downloadwireshark-9a0714cfed522249a408ddcb90574f6119a54a21.tar.gz
Fixed input argument for sscanf "%x" (shall be unsigned int).
Check that this value has been set. svn path=/trunk/; revision=30233
Diffstat (limited to 'epan/req_resp_hdrs.c')
-rw-r--r--epan/req_resp_hdrs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/req_resp_hdrs.c b/epan/req_resp_hdrs.c
index d6f13293a2..eda4319830 100644
--- a/epan/req_resp_hdrs.c
+++ b/epan/req_resp_hdrs.c
@@ -258,8 +258,8 @@ req_resp_hdrs_do_reassembly(tvbuff_t *tvb, const int offset, packet_info *pinfo,
gboolean done_chunking = FALSE;
while (!done_chunking) {
- gint chunk_size = 0;
- gint chunk_offset = 0;
+ guint chunk_size = 0;
+ gint chunk_offset = 0;
gchar *chunk_string = NULL;
gchar *c = NULL;
@@ -299,8 +299,7 @@ req_resp_hdrs_do_reassembly(tvbuff_t *tvb, const int offset, packet_info *pinfo,
*c = '\0';
}
- if ((sscanf(chunk_string, "%x",
- &chunk_size) < 0) || chunk_size < 0) {
+ if (sscanf(chunk_string, "%x", &chunk_size) < 1) {
/* We couldn't get the chunk size,
* so stop trying.
*/