diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2014-06-09 09:40:37 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2014-06-12 18:49:13 +0200 |
commit | 8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2 (patch) | |
tree | 6709da036e5030e13c9043c038da5deb8c91b0a7 /src/mswindows.c | |
parent | 8a919932a6d42770cb413df0c3ef9c9ae5474987 (diff) | |
download | wget-8e6de1fb5ff0ca0c749da7db634a1b1e3a1215a2.tar.gz |
Drop usage of strncpy
Diffstat (limited to 'src/mswindows.c')
-rw-r--r-- | src/mswindows.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mswindows.c b/src/mswindows.c index 0ed8c053..3bdf2178 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -1,6 +1,6 @@ /* mswindows.c -- Windows-specific support Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, + 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2014 Free Software Foundation, Inc. This file is part of GNU Wget. @@ -123,7 +123,7 @@ struct fake_fork_info { HANDLE event; bool logfile_changed; - char lfilename[MAX_PATH + 1]; + char *lfilename; }; /* Determines if we are the child and if so performs the child logic. @@ -165,8 +165,7 @@ fake_fork_child (void) if (new_log_fp) { info->logfile_changed = true; - strncpy (info->lfilename, opt.lfilename, sizeof (info->lfilename)); - info->lfilename[sizeof (info->lfilename) - 1] = '\0'; + info->lfilename = strdup (opt.lfilename); fclose (new_log_fp); } } |