Ignore:
Timestamp:
Oct 14, 2008, 3:03:29 AM (13 years ago)
Author:
charles
Message:

have tr_buildPath() allocate memory from the heap rather than using an input buffer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/verify.c

    r6838 r6896  
    6868    int              nofile;
    6969    struct stat      sb;
    70     char             path[MAX_PATH_LENGTH];
    71     const tr_file * file = &tor->info.files[fileIndex];
    72 
    73     tr_buildPath ( path, sizeof( path ), tor->downloadDir, file->name, NULL );
     70    char           * path;
     71    const tr_file  * file = &tor->info.files[fileIndex];
     72
     73    path = tr_buildPath( tor->downloadDir, file->name, NULL );
    7474    nofile = stat( path, &sb ) || !S_ISREG( sb.st_mode );
    7575
     
    111111    }
    112112
     113    tr_free( path );
     114
    113115    return changed;
    114116}
Note: See TracChangeset for help on using the changeset viewer.