diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.48 2009/10/26 08:18:16 kristaps Exp $ */ +/* $Id: main.c,v 1.49 2009/10/26 08:42:37 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -35,6 +35,7 @@ #ifdef __linux__ extern int getsubopt(char **, char * const *, char **); +extern size_t strlcat(char *, const char *, size_t); # ifndef __dead # define __dead __attribute__((__noreturn__)) # endif @@ -88,7 +89,7 @@ struct curparse { out_man outman; out_free outfree; void *outdata; - char *outopts; + char outopts[BUFSIZ]; }; static int foptions(int *, char *); @@ -135,7 +136,8 @@ main(int argc, char *argv[]) return(EXIT_FAILURE); break; case ('O'): - curp.outopts = optarg; + (void)strlcat(curp.outopts, optarg, BUFSIZ); + (void)strlcat(curp.outopts, ",", BUFSIZ); break; case ('T'): if ( ! toptions(&curp.outtype, optarg)) |