Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b5cfeab4 in mainline


Ignore:
Timestamp:
2011-08-31T14:01:14Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
8d70937
Parents:
07f49ae
Message:

libusbhost: only copy data if the pointer is valid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/batch.c

    r07f49ae rb5cfeab4  
    128128
    129129        /* We are data in, we need data */
    130         memcpy(instance->buffer, instance->data_buffer, instance->buffer_size);
     130        if (instance->data_buffer && (instance->buffer != instance->data_buffer))
     131                memcpy(instance->buffer,
     132                    instance->data_buffer, instance->buffer_size);
    131133
    132134        usb_log_debug2("Batch %p " USB_TRANSFER_BATCH_FMT " completed (%zuB): %s.\n",
Note: See TracChangeset for help on using the changeset viewer.