Lines 16-19: you allocate just one byte per each variable. Then you copy some substantial strings there. After that all bets are off. Fix the buffer overflows first, and then see if the problem persists.
Salem commented: Bingo! +19
halluc1nati0n commented: Great insight into the answer +1
jonsca commented: Yup. I glazed over it! +2
Nick Evan commented: Nice catch, I should've seen that :) +12
Salem commented: Beaten ;) +18
Excizted commented: Useful, thanks :) +1
Ancient Dragon commented: good points in those links. :) +25
Ancient Dragon commented: LOL :) +25
nezachem 616 Practically a Posting Shark
coolfriends commented: Thanks a lot +1
jephthah commented: Christ I know you can't hear me / But I only did what you wanted me to / Christ I'd sell out the nation / For I have been saddled with the murder of you / I have been spattered with innocent blood / I shall be dragged through the slime and the mud. +5
kvprajapati commented: Great! +6