[PATCH] Properly skip over quoted values

Denis Kenzior denkenz at gmail.com
Tue Nov 10 10:54:01 PST 2009


Hi Andrew,

> Otherwise a left paren in a string can bring an obscure segfault.
> ---
> +		if (line[i] == '\"') {
> +			i += 1;
> +			while (i < len && line[i] != '\"')
> +				i += 1;
> +
> +			if (i < len)
> +				i += 1;
> +
> +			continue;
> +		}
> +

I suggest you recursively call skip_until here instead of duplicating the 
code.  It also should be moved down and treated like '(' and ')'

Regards,
-Denis


More information about the ofono mailing list