ntdll: Fix invalid use of uninitialized memory.

This commit is contained in:
Thomas Faller 2015-09-08 16:32:12 +02:00 committed by Alexandre Julliard
parent c6afba8979
commit d90f25156c
1 changed files with 1 additions and 1 deletions

View File

@ -869,7 +869,7 @@ BOOLEAN WINAPI RtlIsNameLegalDOS8Dot3( const UNICODE_STRING *unicode,
if (oem->Length > 12) return FALSE; if (oem->Length > 12) return FALSE;
/* a starting . is invalid, except for . and .. */ /* a starting . is invalid, except for . and .. */
if (oem->Buffer[0] == '.') if (oem->Length > 0 && oem->Buffer[0] == '.')
{ {
if (oem->Length != 1 && (oem->Length != 2 || oem->Buffer[1] != '.')) return FALSE; if (oem->Length != 1 && (oem->Length != 2 || oem->Buffer[1] != '.')) return FALSE;
if (spaces) *spaces = FALSE; if (spaces) *spaces = FALSE;