Re: [PATCH] libnfs.a: fix a bug when parse section's arg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/04/2010 10:45 PM, Mi Jinlong wrote:
> When parsing section's arg at configure file, the pointer 
> should stop when fetch ']', and give the warning message.
> 
> ---
>  support/nfs/conffile.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
> index 24640f4..798e5f3 100644
> --- a/support/nfs/conffile.c
> +++ b/support/nfs/conffile.c
> @@ -271,9 +271,9 @@ conf_parse_line(int trans, char *line, size_t sz)
>  		if (ptr == NULL)
>  			return;
>  		line = ++ptr;
> -		while (*ptr && *ptr != '"')
> +		while (*ptr && *ptr != '"' && *ptr != ']')
>  			ptr++;
> -		if (*ptr == '\0') {
> +		if (*ptr == '\0' || *ptr == ']') {
>  			xlog_warn("config file error: line %d: "
>   				"non-matched '\"', ignoring until next section", ln);
>  		}  else {
Committed...

steved.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux