diff options
author | Gerald Carter <jerry@samba.org> | 2005-07-25 15:04:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:00:16 -0500 |
commit | 2a5087295292f65c63f9a81c2cc73a7d7a95b337 (patch) | |
tree | d33e8599c0f28fc30a281d93108c67987bc6f07a /source3/utils | |
parent | c03f6b32a3f07f429b645f4647d3c7d8f2241999 (diff) | |
download | samba-2a5087295292f65c63f9a81c2cc73a7d7a95b337.tar.gz samba-2a5087295292f65c63f9a81c2cc73a7d7a95b337.tar.bz2 samba-2a5087295292f65c63f9a81c2cc73a7d7a95b337.zip |
r8755: more malloc fixes
(This used to be commit b46546c18a1bf541cb0f172184ca7ecee499b098)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/smbget.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c index 2aca3001a3..e8069802ca 100644 --- a/source3/utils/smbget.c +++ b/source3/utils/smbget.c @@ -101,8 +101,8 @@ void get_auth_data(const char *srv, const char *shr, char *wg, int wglen, char * if(workgroup)strncpy(wg, workgroup, wglen-1); - wgtmp = strndup(wg, wglen); - usertmp = strndup(un, unlen); + wgtmp = SMB_STRNDUP(wg, wglen); + usertmp = SMB_STRNDUP(un, unlen); if(!quiet)printf("Using workgroup %s, %s%s\n", wgtmp, *usertmp?"user ":"guest user", usertmp); free(wgtmp); free(usertmp); } @@ -230,7 +230,7 @@ void print_progress(const char *name, time_t start, time_t now, off_t start_pos, if(columns) { int required = strlen(name), available = columns - len - strlen("[] "); if(required > available) asprintf(&filename, "...%s", name + required - available + 3); - else filename = strndup(name, available); + else filename = SMB_STRNDUP(name, available); } else filename = SMB_STRDUP(name); fprintf(stderr, "\r[%s] %s", filename, status); |