compiler: Construction TBytes from ansistring allocates wrong size and corrupts heap
Original Reporter info from Mantis: AntonK
-
Reporter name: Anton Kavalenka
Original Reporter info from Mantis: AntonK
- Reporter name: Anton Kavalenka
Description:
TByte dynamic array constructed from a ansistring casting
atbyte:=TByte(astring);
allocates +1 length
Delphi works properly.
Steps to reproduce:
Run the attached program compiled with heaptrace
Mantis conversion info:
- Mantis ID: 29312
- OS: Debian GNU/Linux
- OS Build: 8.2
- Platform: i386
- Version: 3.1.1
- Fixed in version: 3.1.1
- Monitored by: » Vincent (Vincent Snijders)