MFC r299593
Properly compute the size argument to pass to malloc().
Reported by: Coverity CID: 1198856