From: Jeffrey Altman Date: Sun, 28 Jun 2015 17:27:03 +0000 (-0400) Subject: Windows: AFSParseName() uniFullName.MaximumLength X-Git-Tag: upstream/1.8.0_pre1^2~239 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=69bc77c538a181315f532ce4ee9e49698e589083;p=packages%2Fo%2Fopenafs.git Windows: AFSParseName() uniFullName.MaximumLength The uniFullName.MaximumLength in AFSParseName() is not properly modified and can end up being extended beyond the actual memory allocation due to a missing decrement. Change-Id: I070ee33acd32849d05bbc83c6e7cfaf55e6a0997 Reviewed-on: http://gerrit.openafs.org/11913 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp b/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp index 6448dedc4..58cb969e3 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSNameSupport.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2008, 2009, 2010, 2011 Kernel Drivers, LLC. - * Copyright (c) 2009, 2010, 2011 Your File System, Inc. + * Copyright (c) 2009, 2010, 2011, 2015 Your File System, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -3657,6 +3657,8 @@ AFSParseName( IN PIRP Irp, { uniFullName.Length -= sizeof( WCHAR); + + uniFullName.MaximumLength -= sizeof( WCHAR); } //