Commit 99869f54 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

fix crash in mallocstrncpy() call

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2046 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -315,7 +315,7 @@ bool findnextstr(bool can_display_wrap, bool wholeword, bool
/* If we're searching for whole words, see if this potential
* match is a whole word. */
if (wholeword) {
char *word = mallocstrncpy(word, found, found_len + 1);
char *word = mallocstrncpy(NULL, found, found_len + 1);
word[found_len] = '\0';
found_whole = is_whole_word(found - fileptr->data,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment