summaryrefslogtreecommitdiff
path: root/dos2unix.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-09-13 16:01:27 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-09-13 16:01:28 +0900
commita43ffe7b214336b5ff551c8965d6fd16c63b13ed (patch)
treeb50d6960573c049b1bae74b6fdc2c53c2fdedf2f /dos2unix.c
parent2fb41ec277dc25c2a3988fc0b3fc8dde07d36062 (diff)
downloaddos2unix-a43ffe7b214336b5ff551c8965d6fd16c63b13ed.tar.gz
dos2unix-a43ffe7b214336b5ff551c8965d6fd16c63b13ed.tar.bz2
dos2unix-a43ffe7b214336b5ff551c8965d6fd16c63b13ed.zip
Imported Upstream version 7.3.5upstream/7.3.5
Change-Id: If401ea1da0876f720539b64ea208bc4e47e084fa Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'dos2unix.c')
-rw-r--r--dos2unix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/dos2unix.c b/dos2unix.c
index ab63aaa..65d3850 100644
--- a/dos2unix.c
+++ b/dos2unix.c
@@ -520,14 +520,14 @@ int main (int argc, char *argv[])
#ifdef ENABLE_NLS
ptr = getenv("DOS2UNIX_LOCALEDIR");
if (ptr == NULL)
- strcpy(localedir,LOCALEDIR);
+ d2u_strncpy(localedir,LOCALEDIR,sizeof(localedir));
else {
if (strlen(ptr) < sizeof(localedir))
- strcpy(localedir,ptr);
+ d2u_strncpy(localedir,ptr,sizeof(localedir));
else {
D2U_UTF8_FPRINTF(stderr,"%s: ",progname);
D2U_ANSI_FPRINTF(stderr, "%s", _("error: Value of environment variable DOS2UNIX_LOCALEDIR is too long.\n"));
- strcpy(localedir,LOCALEDIR);
+ d2u_strncpy(localedir,LOCALEDIR,sizeof(localedir));
}
}
#endif