[FREELDR] INFFILE Parser: Fix while-loop conditions, this bug existed for 16+ years (commit 939d5316, revision 4758).

This commit is contained in:
Hermès Bélusca-Maïto 2019-10-06 18:18:34 +02:00
parent 2f4fb903b4
commit eeeca29c6c
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -1067,9 +1067,9 @@ InfFindFirstLine (
/* Iterate through list of sections */
CacheSection = Cache->FirstSection;
while (Section != NULL)
while (CacheSection != NULL)
{
// DPRINT("Comparing '%S' and '%S'\n", CacheSection->Name, Section);
// DPRINT("Comparing '%s' and '%s'\n", CacheSection->Name, Section);
/* Are the section names the same? */
if (_stricmp(CacheSection->Name, Section) == 0)
@ -1223,9 +1223,9 @@ InfGetLineCount(
/* Iterate through list of sections */
CacheSection = Cache->FirstSection;
while (Section != NULL)
while (CacheSection != NULL)
{
// DPRINT("Comparing '%S' and '%S'\n", CacheSection->Name, Section);
// DPRINT("Comparing '%s' and '%s'\n", CacheSection->Name, Section);
/* Are the section names the same? */
if (_stricmp(CacheSection->Name, Section) == 0)