Menu

#1 seg-fault in ReplyError because sender is -1

open
nobody
None
5
2003-10-28
2003-10-28
Anonymous
No

Anton Wilson
10-28-03
anton.wilson@camotion.com

In /simplipc/srd/simpl.c in Receive():

*sender = shmat(fifoMsg->shmid, 0, 0);
if (*sender == (char *)-1)
{
_simpl_setErrorCode(CANNOT_ATTACH_SHMEM,
taskStuff);
_simpl_log(taskStuff, "%s: cannot attach to
shmem-%s\n", fn, strerror(errno));
ReplyError(*sender, taskStuff);
return(-1);

in ReplyError(), the sender var is dereferenced,
causing a segfault in /simplipc/src/simplUtils for the
sprintf() call.

Discussion


Log in to post a comment.