I have been spending some time in debugging a programme which gives segmentation fault. The bug is quite indeterministic and intermittent, which is annoying. I narrowed it d
strtok() is not reentrant so it should not be used from threaded applications, use strtok_r() instead.
strtok()
strtok_r()