devshr: fixed crash
This commit is contained in:
parent
8a46f407ae
commit
c08f86254e
1 changed files with 2 additions and 2 deletions
|
@ -574,8 +574,8 @@ shrwrite(Chan *c, void *va, long n, vlong)
|
|||
*p = 0;
|
||||
} else
|
||||
desc = "";
|
||||
aname = strchr(buf, '\n') + 1;
|
||||
if(aname != nil && *aname == 0)
|
||||
aname = strchr(buf, '\n');
|
||||
if(aname != nil && *++aname == 0)
|
||||
aname = nil;
|
||||
if(strlen(desc) > 128)
|
||||
error(Ebadarg);
|
||||
|
|
Loading…
Reference in a new issue