aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-11-06 21:32:32 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2014-11-06 21:32:32 +0100
commit382708a1c94c9ccf2c013e240ad11584d105447d (patch)
treef9b52e78cf28505fc3d3865e044ade343f17ff37 /src
parent8707cb94aad8fbdce1d7ec846fc8c693d1d68760 (diff)
downloadyawa-382708a1c94c9ccf2c013e240ad11584d105447d.tar.xz
yawa.c: strncpy --add one less than max
Diffstat (limited to 'src')
-rw-r--r--src/yawa.c2
1 files changed, 1 insertions, 1 deletions
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':