Description: If NULL source string was passed to parseFilter, it caused NULL dereference. https://fedorahosted.org/389/ticket/48289 Reviewed by [email protected].
@@ -929,6 +929,11 @@ parseFilter (
{
int i, j;
+ if (!src) {
+ printf ("Error: NULL source string is passed.\n");
+ return (-1);
+ }
+
for (i=0 ; (i<strlen(src)) && (src[i]!='X') ; i++);
*head = (char *)malloc(i+1);
if (*head == NULL)