Changeset 2219


Ignore:
Timestamp:
Jun 15, 2009, 3:23:36 PM (10 years ago)
Author:
bruno
Message:

Fix a bug where a string could be NULL and used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-mountlist.c

    r2211 r2219  
    542542        }
    543543        log_msg(8,"Entry: %d (%s)", i, drivelist->el[i].device);
    544         log_msg(8,"Adding: %s to %s", tmp, flaws_str);
    545         mr_strcat(flaws_str, "%s", tmp);
    546         paranoid_free(tmp);
     544        /* BCO: tmp can be NULL as well as flaws_str */
     545        if (tmp != NULL) {
     546            log_msg(8,"Adding: %s to %s", tmp, flaws_str);
     547            mr_strcat(flaws_str, "%s", tmp);
     548            paranoid_free(tmp);
     549        }
    547550    }
    548551    res += look_for_duplicate_mountpoints(mountlist, flaws_str);
Note: See TracChangeset for help on using the changeset viewer.