summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2020-09-14 22:49:03 +0200
committerpgen <p.gen.progs@gmail.com>2020-09-14 23:35:16 +0200
commit01bcf1c71afd4b4ba6e79794bc1f8a9abdd5a96d (patch)
treea38eb3ab7a171024b68d70cb12f6110946a1cdb3
parent6c0f890302fb5a2cb77b0ea0cce40affd3e81fae (diff)
Fix a potential memory corruption
-rw-r--r--smenu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/smenu.c b/smenu.c
index a644eb2..6ce69e0 100644
--- a/smenu.c
+++ b/smenu.c
@@ -8666,7 +8666,7 @@ main(int argc, char * argv[])
/* We can now allocate the space for our tmp_word work variable */
/* """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" */
- tmp_word = xmalloc(word_real_max_size + 1);
+ tmp_word = xcalloc(word_real_max_size + 1, 1);
search_data.utf8_off_a = xmalloc(word_real_max_size * sizeof(long));
search_data.utf8_len_a = xmalloc(word_real_max_size * sizeof(long));