mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-03 06:21:49 +02:00
Client: Bugfix: Reading FindInformationList may have caused infinite loop
This commit is contained in:
parent
b59fb0917e
commit
0f43ef1f88
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
/* Copyright (C) 2014-2020 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
*
|
||||
* You can redistribute this program and/or modify it under the terms of
|
||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||
|
@ -24,6 +24,10 @@ namespace SMBLibrary.SMB1
|
|||
{
|
||||
FindInformation entry = FindInformation.ReadEntry(buffer, offset, informationLevel, isUnicode);
|
||||
this.Add(entry);
|
||||
if (entry.NextEntryOffset == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
offset += (int)entry.NextEntryOffset;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue