aboutsummaryrefslogtreecommitdiff
path: root/src/lib/third_party/include
diff options
context:
space:
mode:
authoremanuele-f <black.silver@hotmail.it>2019-10-02 16:26:52 +0200
committeremanuele-f <black.silver@hotmail.it>2019-10-02 16:26:52 +0200
commit7f510c10fe1f764bf42417110cd53cf6ac765a4b (patch)
tree14ec089325a394a5e346ee987385545cae7286be /src/lib/third_party/include
parenta559ba20b1e1c4554c9abb4dc962ef122416c5c2 (diff)
Fix double free after b19bfa1e207a8d4972bfc701fde5d5c014f95383
Diffstat (limited to 'src/lib/third_party/include')
-rw-r--r--src/lib/third_party/include/actypes.h1
-rw-r--r--src/lib/third_party/include/node.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/third_party/include/actypes.h b/src/lib/third_party/include/actypes.h
index 5a94b63a1..2308cd686 100644
--- a/src/lib/third_party/include/actypes.h
+++ b/src/lib/third_party/include/actypes.h
@@ -63,6 +63,7 @@ typedef struct
{
AC_ALPHABET_t * astring; /* String of alphabets */
unsigned int length; /* Length of pattern */
+ u_int8_t is_existing; /* 1 if the node is already part of another AC_PATTERN_t */
AC_REP_t rep; /* Representative string (optional) */
} AC_PATTERN_t;
diff --git a/src/lib/third_party/include/node.h b/src/lib/third_party/include/node.h
index 30836df6a..c172112aa 100644
--- a/src/lib/third_party/include/node.h
+++ b/src/lib/third_party/include/node.h
@@ -55,7 +55,7 @@ struct edge
AC_NODE_t * node_create (void);
AC_NODE_t * node_create_next (AC_NODE_t * thiz, AC_ALPHABET_t alpha);
-void node_register_matchstr (AC_NODE_t * thiz, AC_PATTERN_t * str);
+void node_register_matchstr (AC_NODE_t * thiz, AC_PATTERN_t * str, u_int8_t is_existing);
void node_register_outgoing (AC_NODE_t * thiz, AC_NODE_t * next, AC_ALPHABET_t alpha);
AC_NODE_t * node_find_next (AC_NODE_t * thiz, AC_ALPHABET_t alpha);
AC_NODE_t * node_findbs_next (AC_NODE_t * thiz, AC_ALPHABET_t alpha);