From 5b8ffc08eb1a3643015dfaaaa850e43d6b84b42c Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Tue, 10 Jul 2007 08:21:24 +0000 Subject: [PATCH] Fixed minor issue with sm_trie_add where memory was being read beyond the allocated boundaries --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401094 --- core/sm_trie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sm_trie.cpp b/core/sm_trie.cpp index f3c396a8..3e08b530 100644 --- a/core/sm_trie.cpp +++ b/core/sm_trie.cpp @@ -499,7 +499,7 @@ bool sm_trie_add(Trie *trie, const char *key, void *value, bool replace_allowed) assert(incoming_limit > 0 && incoming_limit <= 255); - for (unsigned int i=1; i<=255; i++,cur++) + for (unsigned int i=1; i<=incoming_limit; i++,cur++) { if (cur->mode == Node_Arc || cur->mode == Node_Term) {