7416da6112
When faced with bogus config ROM read responses from an audio device that did not support block requests as advertized, libffado's csr1212 code was able to recover when running on top of raw1394 but corrupted its config ROM cache when running on top of firewire-core. http://subversion.ffado.org/ticket/299 While the actual cause was a combination of firmware bug of the device and flaw in csr1212.c of libffado, the much less graceful behavior when running on firewire-core was obviously due to libraw1394's firewire-core backend. Hence, - do not write into the client's buffer if rcode != RCODE_COMPLETE, - do not copy more data than the actual response contained. The latter safeguard is not overly effective though. The libraw1394 API has no means to inform a client about the error case that a responder node sent less bytes than were requested. (The case that the responder sent more bytes than requested is covered up by the kernel already.) Should we synthesize an I/O failure? Does not sound ideal either. However, such a size mismatch should never happen; the important part of this change is the RCODE_COMPLETE check. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> |
||
---|---|---|
.. | ||
Makefile.am | ||
arm.c | ||
csr.h | ||
dispatch.c | ||
errors.c | ||
eventloop.c | ||
fcp.c | ||
fw-iso.c | ||
fw.c | ||
fw.h | ||
ieee1394-ioctl.h | ||
ieee1394.h | ||
iso.c | ||
kernel-raw1394.h | ||
main.c | ||
raw1394.h | ||
raw1394_private.h | ||
readwrite.c | ||
version.c |