Changes in kernel/generic/src/ipc/sysipc.c [8add9ca5:f6bffee] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
r8add9ca5 rf6bffee 426 426 case IPC_M_DATA_READ: { 427 427 size_t size = IPC_GET_ARG2(call->data); 428 if ( (size <= 0 || (size > DATA_XFER_LIMIT)))428 if (size <= 0) 429 429 return ELIMIT; 430 430 if (size > DATA_XFER_LIMIT) { 431 int flags = IPC_GET_ARG3(call->data); 432 if (flags & IPC_XF_RESTRICT) 433 IPC_SET_ARG2(call->data, DATA_XFER_LIMIT); 434 else 435 return ELIMIT; 436 } 431 437 break; 432 438 } … … 435 441 size_t size = IPC_GET_ARG2(call->data); 436 442 437 if (size > DATA_XFER_LIMIT) 438 return ELIMIT; 443 if (size > DATA_XFER_LIMIT) { 444 int flags = IPC_GET_ARG3(call->data); 445 if (flags & IPC_XF_RESTRICT) { 446 size = DATA_XFER_LIMIT; 447 IPC_SET_ARG2(call->data, size); 448 } else 449 return ELIMIT; 450 } 439 451 440 452 call->buffer = (uint8_t *) malloc(size, 0);
Note:
See TracChangeset
for help on using the changeset viewer.