Update utils.c

calling 'strlen(out)' on line 28 without having null-terminated 'out'.