Sophie

Sophie

distrib > Mageia > 2 > x86_64 > by-pkgid > 2f7ab49f9f509b5119810491aec70f97 > files > 1

libgcal-0.9.6-3.mga1.src.rpm

--- src/atom_parser.c
+++ src/atom_parser.c
@@ -44,7 +44,6 @@
 #include "internal_gcal.h"
 #include <string.h>
 
-
 void workaround_edit_url(char *inplace)
 {
 	char *aux, *tmp;
@@ -282,7 +281,8 @@
 		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 +292,8 @@
 		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
@@ -383,7 +384,8 @@
 		if (attr1) {
 			if (xmlHasProp(node->nodeTab[i], attr1)) {
 				tmp = xmlGetProp(node->nodeTab[i], attr1);
-				(*types)[i] = strdup(strchr(tmp,'#') + 1);
+				if(strchr(tmp,'#'))
+					(*types)[i] = strdup(strchr(tmp,'#') + 1);
 				xmlFree(tmp);
 			} else
 				(*types)[i] = strdup("");