Fixed a transform crash when setting a negative size value for memset. Fixes PR12202.