https://github.com/FWest98/hsts-iis-module/blob/develop/module/HSTSIisModule.cpp#L164 This is not a proper use of SysAllocStringLen. The length passed in should not be longer than the string passed in. > If strIn is not NULL, then the memory allocated to strIn must be at least ui characters long. Source: https://docs.microsoft.com/en-us/windows/desktop/api/oleauto/nf-oleauto-sysallocstringlen More Info: https://docs.microsoft.com/en-us/previous-versions/5c28xhds(v=vs.80)