Hi Jon, I guess http://www.winehq.org/pipermail/wine-patches/2008-May/055352.html must have been too scary to commit. I independently sent in a fix for the easy part, and it was committed as http://winehq.org/pipermail/wine-cvs/2008-June/043999.html
The last part of your patch, having to do with SysAllocStringByteLen(), seems correct to me, offhand. Maybe if you clean up the comment a bit more, sprinkle sugar on it, and resend, it'll make it in this time. It's so gross, though, that it really should serve as a reminder to us to switch to IMalloc... - Dan