ref: e583ac2cd4327ae30c066d72474de3e14d40a139
parent: 2c54efadb7db62e6d01113b65a7f479506aef7b1
parent: 96a53db2e0c0e981310e96fc2f44aad3fb94f98a
author: Sigrid Haflínudóttir <[email protected]>
date: Wed May 20 10:08:14 EDT 2020
Merge commit '96a53db2e0c0e981310e96fc2f44aad3fb94f98a'
--- a/c9/c9.c
+++ b/c9/c9.c
@@ -277,8 +277,8 @@
}
sz += 2 + len[i];
}
- if(path[i] != NULL || i == 0){
- c->error("c9walk: invalid elements !(0 < %u <= %u)", i, C9maxpathel);
+ if(path[i] != NULL){
+ c->error("c9walk: invalid elements !(0 <= %u <= %u)", i, C9maxpathel);
return C9Epath;
}
@@ -497,7 +497,7 @@
break;
case Rwalk:
- if(sz < 2+13 || (cnt = r16(&b))*13 > sz-2)
+ if(sz < 2 || (cnt = r16(&b))*13 > sz-2)
goto error;
if(cnt > C9maxpathel){
c->error("c9proc: Rwalk !(%u <= %u)", cnt, C9maxpathel);