summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2016-10-22 15:40:33 +0200
committerAnders Broman <a.broman58@gmail.com>2016-10-23 08:20:44 +0000
commit2e962d368a6f19d8a32a997dfa144eb3794009ef (patch)
tree3f3e7471d5a3efd9c456afb5680344cc19ed9eec
parent6b2579801445e25e49b85c4f71283e07858ba6b7 (diff)
downloadwireshark-2e962d368a6f19d8a32a997dfa144eb3794009ef.tar.gz
dtls: use ws_strtoi function.
Change-Id: I4feacfa8e4739faf555c05e3c4823ad8487a994c Reviewed-on: https://code.wireshark.org/review/18392 Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-dtls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index f813278a58..6878efd3f7 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -57,6 +57,7 @@
#include <epan/sctpppids.h>
#include <epan/exported_pdu.h>
#include <wsutil/str_util.h>
+#include <wsutil/strtoi.h>
#include "packet-ssl-utils.h"
#include "packet-dtls.h"
@@ -249,8 +250,8 @@ dtls_parse_uat(void)
{
ssldecrypt_assoc_t *d = &(dtlskeylist_uats[i]);
ssl_parse_key_list(d, dtls_key_hash, "dtls.port", dtls_handle, FALSE);
- if (key_list_stack)
- wmem_stack_push(key_list_stack, GUINT_TO_POINTER(atoi(d->port)));
+ if (key_list_stack && ws_strtou32(d->port, NULL, &port))
+ wmem_stack_push(key_list_stack, GUINT_TO_POINTER(port));
}
}