From d9343fb793c448fcb82270fe63a61dfa782b8af7 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Wed, 17 Apr 2019 14:08:42 +0930 Subject: strxcpy() copies null terminator too --- xwake.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xwake.c b/xwake.c index fc0c8b7..5ecef8f 100644 --- a/xwake.c +++ b/xwake.c @@ -43,8 +43,8 @@ gettriggertimes(int *startarr, int *endarr) { char smodify[6]; char emodify[6]; - strncpy(smodify, start, 5); - strncpy(emodify, end, 5); + strncpy(smodify, start, 6); + strncpy(emodify, end, 6); startarr[0] = atoi(strtok(smodify, ":")); startarr[1] = atoi(strtok(NULL, ":")); -- cgit v1.2.3