diff options
Diffstat (limited to 'mount.cifs.c')
-rw-r--r-- | mount.cifs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mount.cifs.c b/mount.cifs.c index 84274c9..3a6b449 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -926,9 +926,10 @@ parse_options(const char *data, struct parsed_mount_info *parsed_info) if (!value || !*value) { fprintf(stderr, "target ip address argument missing\n"); - } else if (strnlen(value, MAX_ADDRESS_LEN) <= + } else if (strnlen(value, MAX_ADDRESS_LEN) < MAX_ADDRESS_LEN) { - strcpy(parsed_info->addrlist, value); + strlcpy(parsed_info->addrlist, value, + MAX_ADDRESS_LEN); if (parsed_info->verboseflag) fprintf(stderr, "ip address %s override specified\n", |