To quote Wikipedia:
A segmentation fault (often shortened to segfault) is a particular error condition that can occur during the operation of computer software. A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system).
(end quote)
Now this can also occur in a function that has invalid parameters passed also. If the program is small, you can paste it and I'll take a look at it when i get the chance.