fix the malloc in typemap to allocate appropriate size. This fixes a memory corruption bug
Authored by: npaxton 2008-09-16
Parent: [r995]
Child: [r997]