Fixed write-past-end-of-object error in portal.cpp. Long live valgrind.
Fixed write-past-end-of-object error in portal.cpp. Long live valgrind.

Change-Id: Id9c7f660fe77690177c73c178aa5d2efcfddbdcb

cambridgehackers/connectal,hanw/connectal,8l/connectal,cambridgehackers/connectal,chenm001/connectal,csail-csg/connectal,chenm001/connectal,csail-csg/connectal,csail-csg/connectal,cambridgehackers/connectal,8l/connectal,hanw/connectal,8l/connectal,chenm001/connectal,chenm001/connectal,chenm001/connectal,cambridgehackers/connectal,csail-csg/connectal,csail-csg/connectal,hanw/connectal,hanw/connectal,8l/connectal,8l/connectal,cambridgehackers/connectal,hanw/connectal