Commit 9fef5dc8 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Properly check the NtQueryDirectoryFile return status.

parent c90845cf
...@@ -2694,9 +2694,8 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai ) ...@@ -2694,9 +2694,8 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
ai->version.major, ai->version.minor, lang ); ai->version.major, ai->version.minor, lang );
RtlInitUnicodeString( &lookup_us, lookup ); RtlInitUnicodeString( &lookup_us, lookup );
NtQueryDirectoryFile( dir, 0, NULL, NULL, &io, buffer, sizeof(buffer), if (!NtQueryDirectoryFile( dir, 0, NULL, NULL, &io, buffer, sizeof(buffer),
FileBothDirectoryInformation, FALSE, &lookup_us, TRUE ); FileBothDirectoryInformation, FALSE, &lookup_us, TRUE ))
if (io.u.Status == STATUS_SUCCESS)
{ {
ULONG min_build = ai->version.build, min_revision = ai->version.revision; ULONG min_build = ai->version.build, min_revision = ai->version.revision;
FILE_BOTH_DIR_INFORMATION *dir_info; FILE_BOTH_DIR_INFORMATION *dir_info;
...@@ -2709,9 +2708,9 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai ) ...@@ -2709,9 +2708,9 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
{ {
if (data_pos >= data_len) if (data_pos >= data_len)
{ {
NtQueryDirectoryFile( dir, 0, NULL, NULL, &io, buffer, sizeof(buffer), if (NtQueryDirectoryFile( dir, 0, NULL, NULL, &io, buffer, sizeof(buffer),
FileBothDirectoryInformation, FALSE, &lookup_us, FALSE ); FileBothDirectoryInformation, FALSE, &lookup_us, FALSE ))
if (io.u.Status != STATUS_SUCCESS) break; break;
data_len = io.Information; data_len = io.Information;
data_pos = 0; data_pos = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment