Pass the right size of object (in this case, a trailer) to fwohci_buf_pktget.
Since the fp_trail is a pointer to trailer, we have to pass sizeof(*fp_trail) instead of sizeof(fp_trail).
This commit is contained in:
parent
a89beb967d
commit
99a39489d8
|
@ -1157,7 +1157,7 @@ fwohci_buf_input(struct fwohci_softc *sc, struct fwohci_ctx *fc,
|
||||||
* in descriptor is set.
|
* in descriptor is set.
|
||||||
*/
|
*/
|
||||||
len = fwohci_buf_pktget(sc, fc, (caddr_t *)&pkt->fp_trail,
|
len = fwohci_buf_pktget(sc, fc, (caddr_t *)&pkt->fp_trail,
|
||||||
sizeof(pkt->fp_trail));
|
sizeof(*pkt->fp_trail));
|
||||||
if (len <= 0) {
|
if (len <= 0) {
|
||||||
#ifdef FW_DEBUG
|
#ifdef FW_DEBUG
|
||||||
if (fw_verbose)
|
if (fw_verbose)
|
||||||
|
@ -1242,7 +1242,7 @@ fwohci_buf_input(struct fwohci_softc *sc, struct fwohci_ctx *fc,
|
||||||
if (!fc->fc_isoch) {
|
if (!fc->fc_isoch) {
|
||||||
/* get trailer */
|
/* get trailer */
|
||||||
len = fwohci_buf_pktget(sc, fc, (caddr_t *)&pkt->fp_trail,
|
len = fwohci_buf_pktget(sc, fc, (caddr_t *)&pkt->fp_trail,
|
||||||
sizeof(pkt->fp_trail));
|
sizeof(*pkt->fp_trail));
|
||||||
if (len <= 0) {
|
if (len <= 0) {
|
||||||
printf("fwohci_buf_input: malformed input 3: %d\n",
|
printf("fwohci_buf_input: malformed input 3: %d\n",
|
||||||
pkt->fp_hlen - count);
|
pkt->fp_hlen - count);
|
||||||
|
|
Loading…
Reference in New Issue