Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Nov 2016 21:12:33 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r309116 - head/sys/dev/virtio/console
Message-ID:  <201611242112.uAOLCX2f039738@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Nov 24 21:12:32 2016
New Revision: 309116
URL: https://svnweb.freebsd.org/changeset/base/309116

Log:
  virtio_console: correctly determine presense of payload and its length
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/virtio/console/virtio_console.c

Modified: head/sys/dev/virtio/console/virtio_console.c
==============================================================================
--- head/sys/dev/virtio/console/virtio_console.c	Thu Nov 24 21:01:25 2016	(r309115)
+++ head/sys/dev/virtio/console/virtio_console.c	Thu Nov 24 21:12:32 2016	(r309116)
@@ -888,9 +888,9 @@ vtcon_ctrl_task_cb(void *xsc, int pendin
 		if (control == NULL)
 			break;
 
-		if (len > sizeof(control)) {
+		if (len > sizeof(*control)) {
 			payload = (void *)(control + 1);
-			plen = len - sizeof(control);
+			plen = len - sizeof(*control);
 		}
 
 		VTCON_UNLOCK(sc);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611242112.uAOLCX2f039738>