summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mmrfc5424addhmac/mmrfc5424addhmac.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mmrfc5424addhmac/mmrfc5424addhmac.c b/plugins/mmrfc5424addhmac/mmrfc5424addhmac.c
index 6adad187..a7aea9b4 100644
--- a/plugins/mmrfc5424addhmac/mmrfc5424addhmac.c
+++ b/plugins/mmrfc5424addhmac/mmrfc5424addhmac.c
@@ -276,8 +276,11 @@ isHmacPresent(instanceData *pData, msg_t *pMsg)
uchar sdid[33]; /* RFC-based size limit */
MsgGetStructuredData(pMsg, &sdbuf, &sdlen);
-
found = 0;
+
+ if(sdbuf[0] == '-') /* RFC: struc data is empty! */
+ goto done;
+
i = 0;
while(i < sdlen && !found) {
getSDID(sdbuf, sdlen, &i, sdid);
@@ -288,6 +291,7 @@ isHmacPresent(instanceData *pData, msg_t *pMsg)
skipSDID(sdbuf, sdlen, &i);
}
+done:
return found;
}