summaryrefslogtreecommitdiffstats
path: root/libtransport
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-11-04 08:04:36 +0000
committerGerrit Code Review <gerrit@fd.io>2019-11-04 08:04:36 +0000
commited27687177b38da2b0bc43b2e01fcb2034751935 (patch)
tree5cece6ccc1a38d35e766bd044802c68a2022b61c /libtransport
parente043a1223dba07f8103764b91495c0da3aa57a29 (diff)
parenta7aaf5c89ec49efa145fb8959414c006ef7959ae (diff)
Merge "[HICN-356] Fix uninitialized pointer"
Diffstat (limited to 'libtransport')
-rw-r--r--libtransport/src/hicn/transport/utils/verifier.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/libtransport/src/hicn/transport/utils/verifier.cc b/libtransport/src/hicn/transport/utils/verifier.cc
index af19d8b5e..69b2101da 100644
--- a/libtransport/src/hicn/transport/utils/verifier.cc
+++ b/libtransport/src/hicn/transport/utils/verifier.cc
@@ -97,6 +97,8 @@ PARCKeyId *Verifier::addKeyFromCertificate(const std::string &file_name) {
int Verifier::verify(const Packet &packet) {
bool valid = false;
+ // initialize packet.payload_head_
+ const_cast<Packet*>(&packet)->separateHeaderPayload();
// header chain points to the IP + TCP hicn header
utils::MemBuf *header_chain = packet.header_head_;
utils::MemBuf *payload_chain = packet.payload_head_;