pathtrace: fix umovestr return code check
* pathtrace.c (upathmatch): Only NUL-terminated strings can be path-matched, so fix the umovestr return code check to filter out unsuitable strings.
This commit is contained in:
parent
e6f55240a1
commit
1a880cf3bd
@ -65,7 +65,7 @@ upathmatch(struct tcb *tcp, unsigned long upath)
|
||||
{
|
||||
char path[PATH_MAX + 1];
|
||||
|
||||
return umovestr(tcp, upath, sizeof path, path) >= 0 &&
|
||||
return umovestr(tcp, upath, sizeof path, path) > 0 &&
|
||||
pathmatch(path);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user