Changeset e50cd7f in mainline for kernel/generic/src/ipc/sysipc.c
- Timestamp:
- 2011-04-17T19:17:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 63517c2, cfbbe1d3
- Parents:
- ef354b6 (diff), 8595577b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
ref354b6 re50cd7f 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.