From 382708a1c94c9ccf2c013e240ad11584d105447d Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 6 Nov 2014 21:32:32 +0100 Subject: yawa.c: strncpy --add one less than max --- src/yawa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yawa.c b/src/yawa.c index 9427d78..2cac14b 100644 --- a/src/yawa.c +++ b/src/yawa.c @@ -45,7 +45,7 @@ parse_opt (int key, char *arg, struct argp_state *state) case 'a': arguments->add = true; strncpy(arguments->add_color[num_add_colors], arg, - sizeof(arguments->add_color[0])); + sizeof(arguments->add_color[0]) - 1); num_add_colors += 1; break; case 'g': -- cgit v1.2.3-70-g09d2