change unbound sprintf() to snprintf() so network-provided values
can't overflow the buffers.
Applicable to all K/L/M/N branches.
CYNGNOS-3235
Bug: 25747670
Change-Id: Id6a5120c2d08a6fbbd47deffb680ecf82015f4f6
(cherry picked from commit b2396a52)
(cherry picked from commit 5ef31037)