Commit d436f2e
committed
[EXT2FS] Fix an uninitialized variable usage RTC failure
Cherry-picking commit
bobranten/Ext4Fsd@3158b91
See bobranten/Ext4Fsd#83 for more information,
and debug traces.
## How to reproduce:
- Format a partition in Ext2 with Paragon Hard Disk Manager 2010 Professional.
- Compile ReactOS with MSVC, ensuring that the driver is compiled with
`EXT2_HTREE_INDEX` defined and set to 1, and with Run-time error checks
enabled with the `/RTC1` flag (this is the default in our source tree).
- Install ReactOS on this partition.
## What's being observed:
After reboot, some filesystem paths are accessed, and the code inside the
`#ifdef EXT2_HTREE_INDEX` block is taken (in ext2/src/dirctl.c#L777-L794).
For some reasons, the retrieved `rc` doesn't get the "expected" value and
the `goto errorout;` path is taken. After this label, `FileIndex` was
reset to `ByteOffset`, which remained uninitialized.
A bugcheck ensues because of the failed check (usage of uninitialized variable).1 parent 530a48c commit d436f2e
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
968 | 968 | | |
969 | 969 | | |
970 | 970 | | |
971 | | - | |
972 | 971 | | |
973 | 972 | | |
974 | 973 | | |
| |||
0 commit comments