[v2.beta.3] Critical error detected c0000374 Topic is solved

Report problems with documented functionality
User avatar
thqby
Posts: 397
Joined: 16 Apr 2021, 11:18
Contact:

[v2.beta.3] Critical error detected c0000374

Post by thqby » 08 Jan 2022, 10:22

Code: Select all

g := Gui()
g.name := ""
The above code causes heap corruption.

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: [v2.beta.3] Critical error detected c0000374

Post by swagfag » 24 Jan 2022, 17:51

https://github.com/Lexikos/AutoHotkey_L ... 2037-R2305
if u pass an empty string, the strdup path is not executed. then when u call free, ure calling it on unmalloc'd memory, which corrupts the heap
maybe if (*aName) was meant to check for nullptrs, instead of dereferencing the ptr? or maybe the free call should check if an empty string was stored. i cant say if thats an oversight or intentional

lexikos
Posts: 9556
Joined: 30 Sep 2013, 04:07
Contact:

Re: [v2.beta.3] Critical error detected c0000374  Topic is solved

Post by lexikos » 09 Jun 2022, 03:26

Fixed by v2.0-beta.4.

Post Reply

Return to “Bug Reports”