Chameleon

Chameleon Commit Details

Date:2015-03-12 04:22:45 (9 years 1 month ago)
Author:ErmaC
Commit:2617
Parents: 2616
Message:More snprintf (xml.c)
Changes:
M/trunk/i386/libsaio/xml.c

File differences

trunk/i386/libsaio/xml.c
4141
4242
4343
44
44
4545
4646
4747
4848
4949
50
50
5151
52
52
5353
5454
5555
if(tmp->id == id)
{
tmp->string = malloc(strlen(string)+1);
sprintf(tmp->string, "%s", string);
snprintf(tmp->string, strlen(string)+1,"%s", string);
return;
}
tmp = tmp->next;
}
string_ref* new_ref = malloc(sizeof(string_ref));
string_ref *new_ref = malloc(sizeof(string_ref));
new_ref->string = malloc(strlen(string)+1);
sprintf(new_ref->string, "%s", string);
snprintf(new_ref->string, (strlen(string)+1)* sizeof(char),"%s", string);
new_ref->id = id;
new_ref->next = ref_strings;
ref_strings = new_ref;

Archive Download the corresponding diff file

Revision: 2617