Ignore:
Timestamp:
May 15, 2009, 4:56:31 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Use new libmr.a in build process
  • Use mr_strcat to fix a memory allocation bug when mountlist contains lots of references unavailable at restore time, creating a error when memory is statically allocated (more usage is expected now).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/mondorestore/mondo-rstr-newt.c

    r2140 r2209  
    19431943    /** buffers **********************************************************/
    19441944    char tmp[MAX_STR_LEN];
    1945     char flaws_str_A[MAX_STR_LEN];
    1946     char flaws_str_B[MAX_STR_LEN];
    1947     char flaws_str_C[MAX_STR_LEN];
     1945    char *flaws_str_A = NULL;
     1946    char *flaws_str_B = NULL;
     1947    char *flaws_str_C = NULL;
    19481948
    19491949    assert(mountlist != NULL);
    19501950    assert(raidlist != NULL);
    19511951
    1952     strcpy(flaws_str_A, "xxxxxxxxx");
    1953     strcpy(flaws_str_B, "xxxxxxxxx");
    1954     strcpy(flaws_str_C, "xxxxxxxxx");
     1952    asprintf(&flaws_str_A, "%s", "xxxxxxxxx");
     1953    asprintf(&flaws_str_B, "%s", "xxxxxxxxx");
     1954    asprintf(&flaws_str_C, "%s", "xxxxxxxxx");
    19551955    if (mountlist->entries > ARBITRARY_MAXIMUM) {
    19561956        log_to_screen("Arbitrary limits suck, man!");
     
    20432043        }
    20442044    }
     2045    paranoid_free(flaws_str_A);
     2046    paranoid_free(flaws_str_B);
     2047    paranoid_free(flaws_str_C);
    20452048    newtFormDestroy(myForm);
    20462049    newtPopWindow();
     
    20682071{
    20692072    int res = 0;
    2070 //  char tmp[MAX_STR_LEN];
    20712073
    20722074    iamhere("entering eml");
Note: See TracChangeset for help on using the changeset viewer.