Through GDB I have determined that the segfault is occuring somewhere in this block of code.
readInfo(fd)
int fd;
{
char str[200];
while(readInfo(fd,str))
printf("%s\n",str);
}
What this code is trying to accomplish is to read information sent to it by a server. I’m not quite sure what the problem is. Any tips would be greatly appreciated.
EDIT: To be more specific:
Program received signal SIGSEGV, Segmentation fault.
0x0804864b in readInfo ()
I have three tips: