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:
Дмитрий Левин 2013-02-26 19:23:27 +00:00
parent e6f55240a1
commit 1a880cf3bd

View File

@ -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);
}