diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2013-10-29 16:47:59 +0100 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2013-10-29 16:47:59 +0100 |
commit | ab6512fd4165fd6ea2048268bd764d67d5bc48f7 (patch) | |
tree | 79ec110cfbf51062d3131b9d51b6902ef8eb91a6 /printf | |
parent | 89dc9c257cb9e93d253139297a37c32d2d13ed5d (diff) | |
download | gmp-ab6512fd4165fd6ea2048268bd764d67d5bc48f7.tar.gz |
(__gmp_doprnt): Use memcpy instead of strcpy.
Diffstat (limited to 'printf')
-rw-r--r-- | printf/doprnt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/printf/doprnt.c b/printf/doprnt.c index 3555979cd..5f0d9e4ac 100644 --- a/printf/doprnt.c +++ b/printf/doprnt.c @@ -182,7 +182,7 @@ __gmp_doprnt (const struct doprnt_funs_t *funs, void *data, #endif alloc_fmt = __GMP_ALLOCATE_FUNC_TYPE (alloc_fmt_size, char); fmt = alloc_fmt; - strcpy (fmt, orig_fmt); + memcpy (fmt, orig_fmt, alloc_fmt_size); /* last_fmt and last_ap are just after the last output, and hence where the next output will begin, when that's done */ |