[fpreport] SIGSEGV at Color loading if you compile with rangecheck
Original Reporter info from Mantis: af0815 @afriess
-
Reporter name: Andi Friess
Original Reporter info from Mantis: af0815 @afriess
- Reporter name: Andi Friess
Description:
A) SIGSEGV at Color loading if you compile with rangecheck.
Reason are cast between UInt32 and Integer.
The ReadInteger from reads an Int64 and cast this to an Interger and then it is casted to a UInt32. with the value $80000000 it dosnt work with rangecheck. UInt32 is not an real JSON Type. So Int64 or QWord are nativer.
Solution: Make the casts and Ranges of integers more rangechecksafe.
B) A Font definition is not correct assigned if the ParentFont isnt used
Solution: Create the needed TFont
Steps to reproduce:
Try to load the attached BandTest1.json file.
The simplest way is to use the ReportDesign from Lazarus.
Mantis conversion info:
- Mantis ID: 33217
- OS: Win10 / 64 Pro
- OS Build: Win10 / 64 Pro
- Build: 38321
- Platform: Dell XPS
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 38325 (#4a0072d4)
- Target version: 3.0.2