From f76325499abbd5e5212cbe7b479008e3bf1b1a96 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 4 Sep 2000 17:52:42 +0000 Subject: * path.cc (readlink): Check if buffer length is positive. Truncate output to buffer length. Don't terminate buffer with '\0'. --- winsup/cygwin/passwd.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/passwd.cc') diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index 98ea7b04d..a29a8a433 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -178,8 +178,8 @@ search_for (uid_t uid, const char *name) /* Return default passwd entry if passwd is emulated or it's a request for the current user. */ if (passwd_state != loaded - || (! name && uid == myself->uid) - || ( name && strcasematch(name, myself->username))) + || (!name && uid == myself->uid) + || (name && strcasematch(name, myself->username))) return default_pw; return NULL; -- cgit v1.2.3