When calling sprintf, source and destination must not overlap otherwise it is undefined behavior as specified by C99 standard, 7.19.6.6. Signed-off-by: Francois Berder <fberder@outlook.fr>