It's possible to pass weird pointer as "array" parameter
Original Reporter info from Mantis: Alextp
-
Reporter name: CudaText man
Original Reporter info from Mantis: Alextp
- Reporter name: CudaText man
Description:
Free Pascal Compiler version 3.3.1-r43118 [2019/10/04] for x86_64
It's possible to pass weird pointer to array's element as "const ar: TIntArray" param!
This gave me work today to find a bug in CudaText.
Run the proj, it gives crap
[0]: 40
[1]: 50
[2]: 60
[3]: 70
[4]: 80
[5]: 90
[6]: 1278017
[7]: 0
[8]: 65536
[9]: 32660
[10]: 1
[11]: 0
[12]: 2
[13]: 0
[14]: 13361
[15]: 0
[16]: 0
[17]: 0
[18]: 0
[19]: 0
[20]: 0
user@user-Notebook:~/Documents/tst-int-array-fpc3$
Mantis conversion info:
- Mantis ID: 36740
- Platform: Linux x64
- Version: 3.3.1