However whilst it compiles fine, there is a seg fault on the last line where the sscanf is. Last time I saw this error it was because there wasn't enough memory in the variables to store the information. I'm guessing I'm not using malloc properly?

I can't post the entire code unfortunately as it doesn't belong to me.

Then remove the ampersands. The three %s escapes will then fill them (assuming you have them pointing to valid memory and the buffers are large enough). Note the buffer will be never filled as your format strings refers only to three args.
–
mityMay 31 '12 at 22:42

Remove the ampersands. The three %s escapes will then fill them (assuming you have them pointing to valid memory and the buffers are large enough). Note the buffer will be never filled as your format strings refers only to three args