core/libgcal/seg.patch

26 lines
850 B
Diff

diff --git src/atom_parser.c src/atom_parser.c
index bab8987..7272e70 100644
--- src/atom_parser.c
+++ src/atom_parser.c
@@ -282,7 +282,8 @@ static int extract_and_check_multi(xmlDoc *doc, char *xpath_expression,
if (attr2) {
if (xmlHasProp(node->nodeTab[i], attr2)) {
tmp = xmlGetProp(node->nodeTab[i], attr2);
- (*types)[i] = strdup(strchr(tmp,'#') + 1);
+ if(strchr(tmp,'#'))
+ (*types)[i] = strdup(strchr(tmp,'#') + 1);
xmlFree(tmp);
}
else
@@ -292,7 +293,8 @@ static int extract_and_check_multi(xmlDoc *doc, char *xpath_expression,
if (attr3) {
if (xmlHasProp(node->nodeTab[i], attr3)) {
tmp = xmlGetProp(node->nodeTab[i], attr3);
- (*protocols)[i] = strdup(strchr(tmp,'#') + 1);
+ if(strchr(tmp,'#'))
+ (*protocols)[i] = strdup(strchr(tmp,'#') + 1);
xmlFree(tmp);
}
else