Ignore:
Timestamp:
Aug 18, 2009, 3:20:49 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3341@localhost: bruno | 2009-08-13 22:36:24 +0200

  • Replacement of some strcpy
  • Change allocation done in resolve_softlinks_to_get_to_actual_device_file(), where_is_root_mounted(), bkptype_to_string(), which_boot_loader()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2328 r2330  
    25592559 * @return 0 (there was an OK CD in the drive) or 1 (there wasn't).
    25602560 */
    2561 int interrogate_disk_currently_in_cdrw_drive(char *cdrw_dev,
    2562                                              bool keep_looping)
    2563 {
     2561int interrogate_disk_currently_in_cdrw_drive(char *cdrw_dev, bool keep_looping) {
    25642562    int res = 0;
    25652563    char *bkp = NULL;
     
    28232821    /*@ buffers ************************************************** */
    28242822    char *tmp = NULL;
    2825     char *checksum_line, *command;
     2823    char *checksum_line = NULL;
     2824    char *command;
    28262825    char *tempblock;
    28272826    char *curr_slice_fname_uncompressed = NULL;
     
    28592858    assert(bkpinfo != NULL);
    28602859    assert_string_is_neither_NULL_nor_zerolength(biggie_filename);
    2861     malloc_string(checksum_line);
    28622860
    28632861    biggiestruct.for_backward_compatibility = '\n';
     
    28772875    if (ntfsprog_fifo) {
    28782876        file_to_openin = ntfsprog_fifo;
    2879         strcpy(checksum_line, "IGNORE");
    2880         log_msg(2,
    2881                 "Not calculating checksum for %s: it would take too long",
    2882                 biggie_filename);
     2877        mr_asprintf(checksum_line, "IGNORE");
     2878        log_msg(2, "Not calculating checksum for %s: it would take too long", biggie_filename);
    28832879        if ( !find_home_of_exe("ntfsresize")) {
    28842880            fatal_error("ntfsresize not found");
     
    29042900        }
    29052901        mr_free(command);
    2906         (void) fgets(checksum_line, MAX_STR_LEN, fin);
     2902        mr_getline(checksum_line, fin);
    29072903        pclose(fin);
    29082904        totallength = length_of_file (biggie_filename);
     
    29182914    }
    29192915    strcpy(biggiestruct.checksum, checksum_line);
     2916    mr_free(checksum_line);
    29202917
    29212918    mr_asprintf(tmp, "%s", slice_fname(biggie_file_number, 0, bkpinfo->tmpdir, ""));
     
    29402937        log_to_screen("Cannot archive bigfile '%s': not found", biggie_filename);
    29412938
    2942         paranoid_free(checksum_line);
    29432939        mr_free(suffix);
    29442940        return (1);
     
    30743070    mr_free(tmp);
    30753071
    3076     paranoid_free(checksum_line);
    30773072    return (retval);
    30783073}
Note: See TracChangeset for help on using the changeset viewer.