- 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 zero end of tmpBuf for sanity (Rocco).
+ - Added memset() to matchBuf to ensure sanity (Rocco, Adam).
- nano.c:
ABCD()
- New function, figures out what kbinput to return given
/* Make a local copy of the string -- up to the position of the
cursor */
matchBuf = (char *) nmalloc((strlen(buf) + 2) * sizeof(char));
+ memset(matchBuf, '\0', (strlen(buf) + 2));
strncpy(matchBuf, buf, place);
- matchBuf[place] = 0;
tmp = matchBuf;
/* skip any leading white space */