Fix potential missing '\0' when wrapping to legacy am: 2b275704bc
am: c1d56ee648  -s ours

Change-Id: I6013acf90eb7e62132799f3d3a66dcc9908cd47a