Skip to content

Commit 87b9241

Browse files
committed
leader: add 1 byte of security in write data
1 parent a39ecf3 commit 87b9241

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/network/leader.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void get_command(struct leader_resources *l_r, unsigned short user) {
181181
n_command->command = m->op;
182182
n_command->data = NULL;
183183
struct data_write *d_w = generate_data_write(m->address, m->size, NULL);
184-
void *wbuff = malloc(sizeof(char) * (m->size + 1));
184+
void *wbuff = malloc(sizeof(char) * (m->size + 2));
185185
debug("Leader wait DATA from User for OP WRITE", l_r->id);
186186
MPI_Irecv(wbuff, m->size * sizeof(char), MPI_BYTE, user, 0, MPI_COMM_WORLD, &r);
187187
if (0 == MPI_Wait(&r, &st)) {

0 commit comments

Comments
 (0)