@derickflorian Are you passing the handle of a file you opened? (It's been 20 years since I've used C, but segmentation fault means you're trying to access a memory location you can't. Also it won't allocate a string for you. Your string must be allocated first. char mystring[] won't cut it.)
@shaun_haney but now that I think a little bit more, that makes sense. Fopen probably returned garbage because it wasn’t getting a valid path and then fgets was accessing some place it couldn’t maybe?