shared: time-dst - ensure nulstr is null terminated

Fixes CID #1237772.