Re: [PATCH] src: Print error and exit for empty string

2018-02-25 Thread Florian Westphal
Harsha Sharma wrote: > Print error message and exit. For e.g. > > nft -c " " > nft: no command specified > > Without this patch, it segfaults. Right. > strcat(buf, " "); > } > strcat(buf, "\n"); > + > +

[PATCH] src: Print error and exit for empty string

2018-02-25 Thread Harsha Sharma
Print error message and exit. For e.g. nft -c " " nft: no command specified Without this patch, it segfaults. Fixes: https://bugzilla.netfilter.org/show_bug.cgi?id=1215 Signed-off-by: Harsha Sharma --- src/main.c | 12 +++- 1 file changed, 11