summaryrefslogtreecommitdiff
path: root/popt
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-11-10 03:34:51 +0000
committerWayne Davison <wayned@samba.org>2006-11-10 03:34:51 +0000
commita19d285ae3b4453f4643e1e347e9747c62f0aaa3 (patch)
tree77f5c4edc59b0097d8470084996f8d664076c31c /popt
parent564782ba95755052db12357fe59f81877b0adfa1 (diff)
downloadrsync-a19d285ae3b4453f4643e1e347e9747c62f0aaa3.tar.gz
rsync-a19d285ae3b4453f4643e1e347e9747c62f0aaa3.tar.bz2
rsync-a19d285ae3b4453f4643e1e347e9747c62f0aaa3.zip
Changed strcat() calls to strlcat().
Diffstat (limited to 'popt')
-rw-r--r--popt/poptparse.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/popt/poptparse.c b/popt/poptparse.c
index 7bc3a963..bb3b69d6 100644
--- a/popt/poptparse.c
+++ b/popt/poptparse.c
@@ -188,8 +188,8 @@ int poptConfigFileToString(FILE *fp, char ** argstrp, /*@unused@*/ UNUSED(int fl
argstr = realloc(argstr, maxargvlen);
if (argstr == NULL) return POPT_ERROR_MALLOC;
}
- strcat(argstr, " --");
- strcat(argstr, p);
+ strlcat(argstr, " --", maxargvlen);
+ strlcat(argstr, p, maxargvlen);
continue;
}
if (*q != '=')
@@ -217,11 +217,11 @@ int poptConfigFileToString(FILE *fp, char ** argstrp, /*@unused@*/ UNUSED(int fl
argstr = realloc(argstr, maxargvlen);
if (argstr == NULL) return POPT_ERROR_MALLOC;
}
- strcat(argstr, " --");
- strcat(argstr, p);
- strcat(argstr, "=\"");
- strcat(argstr, q);
- strcat(argstr, "\"");
+ strlcat(argstr, " --", maxargvlen);
+ strlcat(argstr, p, maxargvlen);
+ strlcat(argstr, "=\"", maxargvlen);
+ strlcat(argstr, q, maxargvlen);
+ strlcat(argstr, "\"", maxargvlen);
}
*argstrp = argstr;