~ubuntu-branches/ubuntu/breezy/samba/breezy-security

« back to all changes in this revision

Viewing changes to source/utils/smbget.c

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-07-21 17:53:23 UTC
  • mfrom: (0.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050721175323-m3oh6aoigywohfnq
Tags: 3.0.14a-6ubuntu1
Resynchronise with Debian, resolving merge conflicts (#12360)

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        while(*relname == '/')relname++;
129
129
        mkdir(relname, 0755);
130
130
        
131
 
        tmpname = strdup(name);
 
131
        tmpname = SMB_STRDUP(name);
132
132
 
133
133
        while((dirent = smbc_readdir(dirhandle))) {
134
134
                char *newname;
231
231
                int required = strlen(name), available = columns - len - strlen("[] ");
232
232
                if(required > available) asprintf(&filename, "...%s", name + required - available + 3);
233
233
                else filename = strndup(name, available);
234
 
        } else filename = strdup(name);
 
234
        } else filename = SMB_STRDUP(name);
235
235
 
236
236
        fprintf(stderr, "\r[%s] %s", filename, status);
237
237
 
376
376
                offset_check = 0;
377
377
        }
378
378
 
379
 
        readbuf = malloc(blocksize);
 
379
        readbuf = SMB_MALLOC(blocksize);
380
380
 
381
381
        /* Now, download all bytes from offset_download to the end */
382
382
        for(curpos = offset_download; curpos < remotestat.st_size; curpos+=blocksize) {
487
487
                                break;
488
488
                        case POPT_ARG_STRING:
489
489
                                stringdata = (char **)long_options[i].arg;
490
 
                                *stringdata = strdup(val);
 
490
                                *stringdata = SMB_STRDUP(val);
491
491
                                break;
492
492
                        default:
493
493
                                fprintf(stderr, "Invalid variable %s at line %d in %s\n", var, lineno, name);