From ac5d7dcd1872af1348288a62a21d81d8e083476d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 6 Dec 2010 13:40:24 +0000 Subject: [PATCH] * cygpath.cc (get_device_name): Fix path length test. --- winsup/utils/ChangeLog | 4 ++++ winsup/utils/cygpath.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index b0278c587..98c9983c9 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,7 @@ +2010-12-06 Corinna Vinschen + + * cygpath.cc (get_device_name): Fix path length test. + 2010-10-30 Dmitry Potapov * regtool.c (cmd_set): Write correct number of bytes for REG_MULTI_SZ diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc index 997ffc9fa..76de6535b 100644 --- a/winsup/utils/cygpath.cc +++ b/winsup/utils/cygpath.cc @@ -279,7 +279,7 @@ get_device_name (char *path) DOS pathname without the \\.\ prefix. Unless it's longer than MAX_PATH - 1 in which case it needs the \\?\ prefix. */ - if (len = strlen (ret + 4) >= MAX_PATH) + if ((len = strlen (ret + 4)) >= MAX_PATH) ret[2] = '?'; else memmove (ret, ret + 4, strlen (ret + 4) + 1);