encoding text into a string with sprintf() may invites buffer overflows.