From 68e927513435432e7120264ef333e383bc602bb2 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Tue, 19 Apr 2011 13:22:32 +0200 Subject: [PATCH] openac: Make sure path is null-terminated. --- src/openac/openac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/openac/openac.c b/src/openac/openac.c index 5de8f5b7c..086db9e8b 100755 --- a/src/openac/openac.c +++ b/src/openac/openac.c @@ -39,8 +39,8 @@ #include #include -#define OPENAC_PATH IPSEC_CONFDIR "/openac" -#define OPENAC_SERIAL IPSEC_CONFDIR "/openac/serial" +#define OPENAC_PATH IPSEC_CONFDIR "/openac" +#define OPENAC_SERIAL IPSEC_CONFDIR "/openac/serial" #define DEFAULT_VALIDITY 24*3600 /* seconds */ @@ -300,6 +300,7 @@ int main(int argc, char **argv) if (*optarg == '/') /* absolute pathname */ { strncpy(path, optarg, BUF_LEN); + path[BUF_LEN-1] = '\0'; } else /* relative pathname */ {