Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47312
b: refs/heads/master
c: b2051f8
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Feb 8, 2007
1 parent 87c1c70 commit c4f1de0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e658bc556b3b2e699c5d9ba65fcc955f35105f42
refs/heads/master: b2051f887351864d862160e75bc24362c7af8914
9 changes: 6 additions & 3 deletions trunk/drivers/ieee1394/csr1212.c
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,12 @@ static int csr1212_parse_bus_info_block(struct csr1212_csr *csr)
csr->private);
if (ret != CSR1212_SUCCESS)
return ret;

/* check ROM header's info_length */
if (i == 0 &&
CSR1212_BE32_TO_CPU(csr->cache_head->data[0]) >> 24 !=
bytes_to_quads(csr->bus_info_len) - 1)
return CSR1212_EINVAL;
}

bi = (struct csr1212_bus_info_block_img*)csr->cache_head->data;
Expand All @@ -1250,9 +1256,6 @@ static int csr1212_parse_bus_info_block(struct csr1212_csr *csr)
return ret;
}

if (bytes_to_quads(csr->bus_info_len - sizeof(csr1212_quad_t)) != bi->length)
return CSR1212_EINVAL;

#if 0
/* Apparently there are too many differnt wrong implementations of the
* CRC algorithm that verifying them is moot. */
Expand Down

0 comments on commit c4f1de0

Please sign in to comment.