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

Changeset 72cd53d in mainline for uspace/lib/c/generic/devman.c


Ignore:
Timestamp:
2011-05-17T07:18:11Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
3375bd4
Parents:
50cd285 (diff), e913cc9 (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.
Message:

Small fixes and improvements

Fixed buffer overflow in lsusb.
lsusb scans all adresses, not only first ones.
Played with logging levels, now it is configurable.
VHC prints name of connected device and destroys pending transfers
when device is unplugged.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/devman.c

    r50cd285 r72cd53d  
    415415        }
    416416
     417        /* To be on the safe-side. */
    417418        path[path_size - 1] = 0;
    418419
    419         if (IPC_GET_ARG2(data_request_call) >= path_size) {
     420        size_t transferred_size = IPC_GET_ARG2(data_request_call);
     421
     422        if (transferred_size >= path_size) {
    420423                return ELIMIT;
    421424        }
     425
     426        /* Terminate the string (trailing 0 not send over IPC). */
     427        path[transferred_size] = 0;
    422428
    423429        return EOK;
Note: See TracChangeset for help on using the changeset viewer.