Skip to content

Commit e70a7a1

Browse files
committed
ipc: invalidate freed pointers in recv()
1 parent 025af5d commit e70a7a1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ipc/sockio.c

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ ssize_t recv(Thread *t, int sd, void *buffer, size_t len, int flags) {
130130
if(!self->inboundCount) {
131131
free(self->inbound);
132132
free(self->inboundLen);
133+
self->inbound = NULL;
134+
self->inboundLen = NULL;
133135
} else {
134136
memmove(&self->inbound[0], &self->inbound[1], self->inboundCount * sizeof(void *));
135137
memmove(&self->inboundLen[0], &self->inboundLen[1], self->inboundCount * sizeof(size_t));

0 commit comments

Comments
 (0)