Changeset 1074 in MondoRescue for trunk/mondo/src/lib/mr_str.c


Ignore:
Timestamp:
Jan 25, 2007, 4:18:12 PM (17 years ago)
Author:
Bruno Cornec
Message:

This version of trunk desn't seg fault on mr_msg anymore.
Still not ready for 3.0.0 but improvements ongoing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/lib/mr_str.c

    r969 r1074  
    88#include <stdio.h>
    99#include <string.h>
     10
     11#include "mr_mem.h"
    1012 
    1113/**
     
    3537    strptr += pos2;
    3638    pos1 = strcspn(strptr, delims);
    37     token = malloc(sizeof(*token) * (pos1 + 1));
     39    token = (char *)mr_malloc(sizeof(*token) * (pos1 + 1));
    3840    strncpy(token, strptr, pos1);
    3941    token[pos1] = '\0';
     
    8082    inptr = instr;
    8183
    82     retstr = (char *) malloc(strlen(inptr) + cnt + 1);
     84    retstr = (char *) mr_malloc(strlen(inptr) + cnt + 1);
    8385    retptr = retstr;
    8486
Note: See TracChangeset for help on using the changeset viewer.