Changeset 670 for branches/2.0.8


Ignore:
Timestamp:
Jun 11, 2006, 7:51:07 AM (13 years ago)
Author:
andree
Message:

Do the usual strcpy() and paranoid_free() after first asprintf() in
parse_mdstat() to avoid segmentation fault.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0.8/mondo/mondo/common/libmondo-raid.c

    r576 r670  
    10421042    pos = string;
    10431043    while (*pos == ' ') *pos++;
    1044     asprintf(&string, pos);
    1045     //
     1044    asprintf(&strtmp, pos);
     1045    strcpy(string, strtmp);
     1046    paranoid_free(strtmp);
    10461047    // if we have newline after only spaces, this is a blank line, update
    10471048    // counters, otherwise do normal parsing
Note: See TracChangeset for help on using the changeset viewer.