mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Dmitry Gorbachev
- lfn_get() reads past the end of name[]. Though harmless, it produces 'array subscript is above array bounds' compiler warning (treated as error). See issue #3762 for more details. svn path=/trunk/; revision=36661
This commit is contained in:
parent
cbda8b5401
commit
feb1e5232e
1 changed files with 5 additions and 1 deletions
|
@ -410,8 +410,12 @@ char *lfn_get( DIR_ENT *de )
|
|||
}
|
||||
}
|
||||
|
||||
for (sum = 0, i = 0; i < 11; i++)
|
||||
for (sum = 0, i = 0; i < 8; i++)
|
||||
sum = (((sum&1) << 7) | ((sum&0xfe) >> 1)) + de->name[i];
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
sum = (((sum&1) << 7) | ((sum&0xfe) >> 1)) + de->ext[i];
|
||||
|
||||
if (sum != lfn_checksum) {
|
||||
/* checksum doesn't match, long name doesn't apply to this alias */
|
||||
/* Causes: 1) alias renamed */
|
||||
|
|
Loading…
Reference in a new issue