Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XwdLoader: Fix buffer over-read and improve general robustness
This commit fixes a buffer over-read that could occur due to g_ntohl() evaluating its argument more than once if at least one of the following is true: * Build target is not x86. * __OPTIMIZE__ is not set during compilation (e.g. -O0 was used). It also improves robustness more generally and fixes an issue where the wrong field was being used to calculate the color map size, causing some image files that were otherwise fine to be rejected. Reported by @JieyongMa via huntr.dev.
- Loading branch information
Showing
1 changed file
with
55 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters