Re: [PATCH v2 nft] libnftables: Print error and exit for empty string

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

 



Harsha Sharma <harshasharmaiitr@xxxxxxxxx> wrote:
> For e.g.
> 
> nft -c "  "
> nft: no command specified
> 
> Without this patch it segfaults.

Applied, thanks for following up.
I made one small change:

> +	if (list_empty(&state->cmds)) {
> +		fprintf(stderr, "nft: no command specified\n");
> +		goto out;
> +	}

I removed the error message, 'nft -c "  "' will just return 0.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux