From: Jeremy Allison Date: Fri, 25 Apr 2008 15:29:08 +0000 (-0700) Subject: Remove hard coded sizes. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9eec6e73fbcd0256d5cc507bb4434976d7133a0;p=thirdparty%2Fsamba.git Remove hard coded sizes. Jeremy. --- diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index 1b67a5e8e6d..96ab4a8910e 100644 --- a/source/client/mount.cifs.c +++ b/source/client/mount.cifs.c @@ -516,7 +516,7 @@ static int parse_options(char ** optionsp, int * filesys_flags) printf("CIFS: invalid domain name\n"); return 1; /* needs_arg; */ } - if (strnlen(value, 65) < 65) { + if (strnlen(value, DOMAIN_SIZE+1) < DOMAIN_SIZE+1) { got_domain = 1; } else { printf("domain name too long\n"); @@ -1194,9 +1194,9 @@ int main(int argc, char ** argv) if (getenv("PASSWD")) { if(mountpassword == NULL) - mountpassword = (char *)calloc(65,1); + mountpassword = (char *)calloc(MOUNT_PASSWD_SIZE+1,1); if(mountpassword) { - strlcpy(mountpassword,getenv("PASSWD"),MOUNT_PASSWD_SIZE); + strlcpy(mountpassword,getenv("PASSWD"),MOUNT_PASSWD_SIZE+1); got_password = 1; } } else if (getenv("PASSWD_FD")) {