From: Dmitry V. Levin Date: Tue, 26 Feb 2013 19:23:27 +0000 (+0000) Subject: pathtrace: fix umovestr return code check X-Git-Tag: v4.8~116 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a880cf3bd8c12af6d831c2dfa5b259be074d77a;p=strace 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. --- diff --git a/pathtrace.c b/pathtrace.c index f202c99f..83d79d37 100644 --- a/pathtrace.c +++ b/pathtrace.c @@ -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); }