From 2a5087295292f65c63f9a81c2cc73a7d7a95b337 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 25 Jul 2005 15:04:25 +0000 Subject: r8755: more malloc fixes (This used to be commit b46546c18a1bf541cb0f172184ca7ecee499b098) --- source3/utils/smbget.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/utils') 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); -- cgit