Rev 2662 | Rev 2677 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2662 | Rev 2676 | ||
---|---|---|---|
Line 270... | Line 270... | ||
270 | uintptr_t dst; |
270 | uintptr_t dst; |
271 | uintptr_t size; |
271 | uintptr_t size; |
272 | uintptr_t max_size; |
272 | uintptr_t max_size; |
273 | 273 | ||
274 | dst = IPC_GET_ARG1(answer->data); |
274 | dst = IPC_GET_ARG1(answer->data); |
275 | size = IPC_GET_ARG3(answer->data); |
275 | size = IPC_GET_ARG2(answer->data); |
276 | max_size = IPC_GET_ARG3(*olddata); |
276 | max_size = IPC_GET_ARG2(*olddata); |
277 | 277 | ||
278 | if (size <= max_size) { |
278 | if (size <= max_size) { |
279 | rc = copy_to_uspace((void *) dst, |
279 | rc = copy_to_uspace((void *) dst, |
280 | answer->buffer, size); |
280 | answer->buffer, size); |
281 | if (rc) |
281 | if (rc) |
Line 323... | Line 323... | ||
323 | size = IPC_GET_ARG2(call->data); |
323 | size = IPC_GET_ARG2(call->data); |
324 | if ((size <= 0 || (size > DATA_XFER_LIMIT))) |
324 | if ((size <= 0 || (size > DATA_XFER_LIMIT))) |
325 | return ELIMIT; |
325 | return ELIMIT; |
326 | break; |
326 | break; |
327 | case IPC_M_DATA_WRITE: |
327 | case IPC_M_DATA_WRITE: |
328 | src = IPC_GET_ARG2(call->data); |
328 | src = IPC_GET_ARG1(call->data); |
329 | size = IPC_GET_ARG3(call->data); |
329 | size = IPC_GET_ARG2(call->data); |
330 | 330 | ||
331 | if ((size <= 0) || (size > DATA_XFER_LIMIT)) |
331 | if ((size <= 0) || (size > DATA_XFER_LIMIT)) |
332 | return ELIMIT; |
332 | return ELIMIT; |
333 | 333 | ||
334 | call->buffer = (uint8_t *) malloc(size, 0); |
334 | call->buffer = (uint8_t *) malloc(size, 0); |