summaryrefslogtreecommitdiff
path: root/include/ouroboros/ipcp.h
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2018-09-27 11:36:42 +0200
committerDimitri Staessens <dimitri.staessens@ugent.be>2018-09-27 13:59:29 +0200
commitc166a030a1be0e4006605dd12190741986e0f9f2 (patch)
tree35402df575984b3e9d78d28d2f09b3db75b5675b /include/ouroboros/ipcp.h
parentaf6756b94bb8c78d2d09a28966427e68b95c5a93 (diff)
downloadouroboros-c166a030a1be0e4006605dd12190741986e0f9f2.tar.gz
ouroboros-c166a030a1be0e4006605dd12190741986e0f9f2.zip
tools: Fix memleaks and buffer overflows in irm tool
This fixes some memleaks and potential buffer overflows in the irm tool. Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be> Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Diffstat (limited to 'include/ouroboros/ipcp.h')
-rw-r--r--include/ouroboros/ipcp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ouroboros/ipcp.h b/include/ouroboros/ipcp.h
index c7013f08..e423a015 100644
--- a/include/ouroboros/ipcp.h
+++ b/include/ouroboros/ipcp.h
@@ -27,7 +27,7 @@
#include <unistd.h>
#include <stdbool.h>
-#define LAYER_NAME_SIZE 256
+#define LAYER_NAME_SIZE 255
/*
* NOTE: the IRMd uses this order to select an IPCP
@@ -67,7 +67,7 @@ enum pol_dir_hash {
/* Info reported back to the IRMd about the layer on enrollment */
struct layer_info {
- char layer_name[LAYER_NAME_SIZE];
+ char layer_name[LAYER_NAME_SIZE + 1];
int dir_hash_algo;
};