From b56179f83afc684a6bf1c7577a898374bb89c852 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 24 Nov 2016 10:53:08 +0100 Subject: [PATCH] fcwd_access_t: Add missing breaks in f_cwd pointer computation Fixes Coverity CIDs 59893/59894 Signed-off-by: Corinna Vinschen --- winsup/cygwin/path.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 419f9cfb0..aaf192820 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -3966,12 +3966,15 @@ fcwd_access_t::SetDirHandleFromBufferPointer (PWCHAR buf_p, HANDLE dir) default: f_cwd = (fcwd_access_t *) ((PBYTE) buf_p - __builtin_offsetof (FAST_CWD_OLD, Buffer)); + break; case FCWD_W7: f_cwd = (fcwd_access_t *) ((PBYTE) buf_p - __builtin_offsetof (FAST_CWD_7, Buffer)); + break; case FCWD_W8: f_cwd = (fcwd_access_t *) ((PBYTE) buf_p - __builtin_offsetof (FAST_CWD_8, Buffer)); + break; } f_cwd->DirectoryHandle () = dir; } -- 2.43.5