I can't believe I was so stupid, I forgot to initalize the return string from rndstr_sjis so the strcat messed up, causing segfaults in iconv