Add some notes to cat.c

This commit is contained in:
Mid Favila 2022-08-13 20:16:54 -04:00
parent 0ecd45a51d
commit 613b12f0de
1 changed files with 1 additions and 0 deletions

View File

@ -86,6 +86,7 @@ int main(int argc, char **argv)
if(!upresence and (2 * (strlen(buf) + strlen(newbuf)) >= buflen))
{
/* Rewrite this bit to use realloc and/or memcpy? */
tmpbuf = malloc(2 * (strlen(buf) + strlen(newbuf)));
strcpy(tmpbuf, buf);
free(buf);