And would suggest that you make plans to dump the OBJ format at some point and stick with binary file formats, even if that means creating your own. As you've seen, writing a loader for a human readable format SUCKS!
Also, looking at your code, this "vertexBuffer = (float*) malloc (fileSize);" needs to be "vertexBuffer = (float*) malloc (fileSize*sizeof(float));". You are allocating an array of fileSize bytes as written, not an array of fileSize floats.
To that end, skip malloc all together. Use new/delete.
vertexBuffer = new float[fileSize]; . . . detete [] vertexBuffer;