From: David Griffith Date: Sun, 3 Feb 2019 13:49:20 +0000 (-0800) Subject: Fixed one instance of strcpy(). The rest are proving tricky. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=6510dab7710452ea522aa27d0f47b57e6cf48c0b;p=liskon_frotz.git Fixed one instance of strcpy(). The rest are proving tricky. --- diff --git a/src/curses/ux_input.c b/src/curses/ux_input.c index c6876ab..1181f5d 100644 --- a/src/curses/ux_input.c +++ b/src/curses/ux_input.c @@ -330,7 +330,7 @@ static void unix_add_to_history(zchar *str) if (*history_next != NULL) free( *history_next); *history_next = (char *)malloc(strlen((char *)str) + 1); - strcpy( *history_next, (char *)str); + strncpy( *history_next, (char *)str, strlen((char*)str) + 1); RING_INC( history_next, history_buffer, history_end); history_view = history_next; /* Reset user frame after each line */