maint: check return of split_cmdline to avoid bad config strings
As the testcase demonstrates, it's possible for split_cmdline to return -1 and deallocate any memory it's allocated, if the config string is missing an end quote. In both the cases below, which are the only calling sites, the return isn't checked, and using the pointer causes a pretty immediate segfault. Signed-off-by: NDeskin Miller <deskinm@umich.edu> Acked-by: NMiklos Vajna <vmiklos@frugalware.org> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
Showing
想要评论请 注册 或 登录