From 8451a289ccfb394922470880952aaa6a372122a1 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 23 Aug 2013 20:40:27 +0000 Subject: [PATCH] * flock.cc (lockf_t::from_obj_name): Fix test for valid pid. --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/flock.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index dfc72baf6..8dda31cca 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2013-08-23 Corinna Vinschen + + * flock.cc (lockf_t::from_obj_name): Fix test for valid pid. + 2013-08-23 Christopher Faylor * spawn.cc (child_info_spawn): Revert previous change. Always set diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc index c9d7eb6ea..33f16af06 100644 --- a/winsup/cygwin/flock.cc +++ b/winsup/cygwin/flock.cc @@ -564,7 +564,7 @@ lockf_t::from_obj_name (inode_t *node, lockf_t **head, const wchar_t *name) return false; lf_id = wcstoll (endptr + 1, &endptr, 16); if (!endptr || *endptr != L'-' - || ((lf_flags & F_POSIX) && (lf_id < 1 || lf_id > ULONG_MAX))) + || ((lf_flags & F_POSIX) && (lf_id < 1 || lf_id > UINT32_MAX))) return false; lf_wid = wcstoul (endptr + 1, &endptr, 16); if (!endptr || *endptr != L'-')