On 1/5/23 16:33, Peter Maydell wrote:
On Wed, 21 Dec 2022 at 18:32, Stephen Longfield <slongfi...@google.com> wrote:

Size is used at lines 1088/1188 for the loop, which reads the last 4
bytes from the crc_ptr so it does need to get increased, however it
shouldn't be increased before the buffer is passed to CRC computation,
or the crc32 function will access uninitialized memory.

This was pointed out to me by c...@kaod.org during the code review of
a similar patch to hw/net/ftgmac100.c

Change-Id: Ib0464303b191af1e28abeb2f5105eb25aadb5e9b
Signed-off-by: Stephen Longfield <slongfi...@google.com>
Reviewed-by: Patrick Venture <vent...@google.com>

Applied to target-arm.next, thanks.

Did you take the ftgmac100 also ?

(Looking at other ethernet device models we do indeed want to crc
just the packet, not "packet plus 4 0 bytes" or something.)

(There are some coverity issues in that area)

C.




Reply via email to