Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Cleanup and sanity-checking of unintentional integer overflow, unsigned/zero comparis...
[palacios.git] / palacios / src / devices / lnx_virtio_nic.c
index ad0b9e9..b22a5be 100644 (file)
@@ -612,7 +612,8 @@ static int virtio_rx(uint8_t * buf, uint32_t size, void * private_data) {
     if (q->cur_avail_idx != q->avail->index){
        uint16_t buf_idx;
        struct vring_desc * buf_desc;
-       uint32_t hdr_len, len;
+       uint32_t hdr_len;
+       int len;
        uint32_t offset = 0;
 
        hdr_len = (virtio->mergeable_rx_bufs)?