Changes in kernel/generic/src/ipc/sysipc.c [f6bffee:8add9ca5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
rf6bffee r8add9ca5 426 426 case IPC_M_DATA_READ: { 427 427 size_t size = IPC_GET_ARG2(call->data); 428 if ( size <= 0)428 if ((size <= 0 || (size > DATA_XFER_LIMIT))) 429 429 return ELIMIT; 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 } 430 437 431 break; 438 432 } … … 441 435 size_t size = IPC_GET_ARG2(call->data); 442 436 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 } 437 if (size > DATA_XFER_LIMIT) 438 return ELIMIT; 451 439 452 440 call->buffer = (uint8_t *) malloc(size, 0);
Note:
See TracChangeset
for help on using the changeset viewer.