Commit b4c43683 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

input_tab(): - Added null end of matchBuf for sanity (Rocco).

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@479 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent a35ec048
Showing with 2 additions and 0 deletions
+2 -0
......@@ -28,6 +28,7 @@ General
- Added space and - keys to do page up and down.
cwd_tab_completion(), input_tab()
- Changed bare malloc/calloc calls to nmalloc (found by Rocco).
- Added null end of tmpBuf for sanity (Rocco).
- nano.c:
ABCD()
- New function, figures out what kbinput to return given
......
......@@ -885,6 +885,7 @@ char *input_tab(char *buf, int place, int *lastWasTab, int *newplace)
matchBuf = (char *) nmalloc((strlen(buf) + 2) * sizeof(char));
strncpy(matchBuf, buf, place);
matchBuf[place] = (char) NULL;
tmp = matchBuf;
/* skip any leading white space */
......
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