decode: fix pointers and fix null into string

Fixes bug #1133337.

R=jameinel
CC=
https://codereview.appspot.com/8019043