提交 547ad3d1 编写于 作者: N Noel Power

fix CID #1169705 (dereference before null check)

Signed-off-by: NNoel Power <noel.power@suse.com>
上级 f5287078
......@@ -63,11 +63,11 @@ static void strlwc(char * s)
/*--------------------------------------------------------------------------*/
void strstrip(char * s)
{
if (s==NULL) return ;
char *last = s + strlen(s);
char *dest = s;
if (s==NULL) return ;
while (isspace((int)*s) && *s) s++;
while (last > s) {
if (!isspace((int)*(last-1)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册