From 34c9b630056a3b6f5c44df968e3a6c172f1b6436 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 24 Oct 2015 08:20:05 +0000 Subject: [PATCH 1/1] [MSVCRT] Add a test that shows that _splitpath() null-terminates drive svn path=/trunk/; revision=69661 --- rostests/apitests/msvcrt/splitpath.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rostests/apitests/msvcrt/splitpath.c b/rostests/apitests/msvcrt/splitpath.c index 55f8277799c..4f2396ce4f0 100644 --- a/rostests/apitests/msvcrt/splitpath.c +++ b/rostests/apitests/msvcrt/splitpath.c @@ -22,11 +22,13 @@ START_TEST(splitpath) Major = (DWORD)(LOBYTE(LOWORD(GetVersion()))); + drive[2] = 0xFF; _splitpath("c:\\dir1\\dir2\\file.ext", drive, dir, fname, ext); ok_str(drive, "c:"); ok_str(dir, "\\dir1\\dir2\\"); ok_str(fname, "file"); ok_str(ext, ".ext"); + ok_int(drive[2], 0); *_errno() = 0; _splitpath("c:\\dir1\\dir2\\file.ext", 0, 0, 0, 0); -- 2.17.1