X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fne2k.c;h=f94b96651116b7fa64c756a642a4b0025d44a507;hp=413ec2445d072d9a8a6fb58f8044742b08afa77a;hb=d775bbfa668ce9968bacc0e4257cf86e5ab88e90;hpb=d22c11cec4e8c3390bfe6bf16ed07f5d073f0d4a diff --git a/palacios/src/devices/ne2k.c b/palacios/src/devices/ne2k.c index 413ec24..f94b966 100644 --- a/palacios/src/devices/ne2k.c +++ b/palacios/src/devices/ne2k.c @@ -391,6 +391,7 @@ static int ne2k_rxbuf_full(struct ne2k_registers * regs) { // This needs to be completely redone... static int rx_one_pkt(struct ne2k_state * nic_state, const uchar_t * pkt, uint32_t length) { struct ne2k_registers * regs = (struct ne2k_registers *)&(nic_state->context); + uchar_t buf[MIN_BUF_SIZE]; uchar_t * p; uint32_t total_len; uint32_t next; @@ -414,8 +415,6 @@ static int rx_one_pkt(struct ne2k_state * nic_state, const uchar_t * pkt, uint3 //packet too small, expand it if (length < MIN_BUF_SIZE) { - uchar_t buf[MIN_BUF_SIZE]; - memcpy(buf, pkt, length); memset(buf + length, 0, MIN_BUF_SIZE - length); pkt = buf;