summaryrefslogtreecommitdiff
path: root/extcap/ciscodump.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-03-24 14:19:31 -0700
committerGuy Harris <guy@alum.mit.edu>2016-03-24 21:20:00 +0000
commitb0db6a01a8de15a1eabb4a69135066034761dc2a (patch)
tree8caed32a2f40f8e2c43aba68258157b338306534 /extcap/ciscodump.c
parenta4aa8930bb47296704a4689cdbfa8f5b8b3f550f (diff)
downloadwireshark-b0db6a01a8de15a1eabb4a69135066034761dc2a.tar.gz
First convert the string to a number, then convert it to network byte order.
That should squelch some warnings from the compiler on the OS X buildbot. Change-Id: I0da16469fb48e26677c5366d6fe290db2bf52a10 Reviewed-on: https://code.wireshark.org/review/14619 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'extcap/ciscodump.c')
-rw-r--r--extcap/ciscodump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/extcap/ciscodump.c b/extcap/ciscodump.c
index 1db3f65662..2eb08772fe 100644
--- a/extcap/ciscodump.c
+++ b/extcap/ciscodump.c
@@ -227,7 +227,8 @@ static int parse_line(char* packet _U_, unsigned* offset, char* line, int status
part = parts;
while(*part) {
if (strlen(*part) > 1) {
- value = (guint32)htonl(strtoul(*part, NULL, 16));
+ value = (guint32)strtoul(*part, NULL, 16);
+ value = htonl(value);
size = strlen(*part) / 2;
memcpy(packet + *offset, &value, size);
*offset += (guint32)size;