summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/controller/xhci_pci.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2016-09-08 05:13:50 +0000
committerache <ache@FreeBSD.org>2016-09-08 05:13:50 +0000
commit56ade7a489e1dc176faf0206cbed2f8659a92648 (patch)
tree73f2bc0f039911954a4e05204dfd04c1b27395a4 /sys/dev/usb/controller/xhci_pci.c
parent595191c4ea58a782473f4396aa34b53867c70aac (diff)
downloadFreeBSD-src-56ade7a489e1dc176faf0206cbed2f8659a92648.zip
FreeBSD-src-56ade7a489e1dc176faf0206cbed2f8659a92648.tar.gz
MFC r305406,r305409,r305412
1) Fix errors handling. 2) Prevent out of bounds access to ws[-1] (passed buffer) which happens when the first mb sequence is incomplete and there are not enougn chars in the read buffer. ws[-1] may lead to memory faults or false results, in case the memory here contains '\n'. 3) Fix n == 1 case. Here should be no physical read (fill buffer) attempt (we read n - 1 chars with the room for NUL, see fgets()), and no NULL return.
Diffstat (limited to 'sys/dev/usb/controller/xhci_pci.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud