X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-host-dev.c;h=23adb35956319be27a92fd7dc0e1720c6d8c923f;hb=d13fa71cb7a372c39ea92aaa69d74d63d9e0ed8e;hp=c9c586e5321564e5da9be33c47f300985bca91b6;hpb=145dbb97d24518a80348a2aec5494b6d7805081b;p=palacios.git diff --git a/linux_module/iface-host-dev.c b/linux_module/iface-host-dev.c index c9c586e..23adb35 100644 --- a/linux_module/iface-host-dev.c +++ b/linux_module/iface-host-dev.c @@ -369,6 +369,7 @@ static long host_dev_ioctl(struct file * fp, unsigned int val, unsigned long arg switch (op.type) { case PALACIOS_HOST_DEV_USER_REQUEST_READ_GUEST: { + // possible overflow here, but only if user is asking for too much... void *temp = palacios_alloc(op.len); DEEP_DEBUG_PRINT("palacios: hostdev: read guest\n"); @@ -785,6 +786,7 @@ static v3_host_dev_t palacios_host_dev_open_deferred(char *url, memset(dev,0,sizeof(struct palacios_host_device_user)); strncpy(dev->url,url,MAX_URL); + dev->url[MAX_URL-1] = 0; dev->guestdev = gdev;