git: 5fed793a5086 - stable/13 - vt: fix splash_cpu logos use of vd_drawrect

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Wed, 16 Feb 2022 00:41:22 UTC
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=5fed793a5086150bf8d2072651e8bf14a6f5e735

commit 5fed793a5086150bf8d2072651e8bf14a6f5e735
Author:     Stefan Grundmann <sg2342@googlemail.com>
AuthorDate: 2022-02-09 03:15:53 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-02-16 00:39:34 +0000

    vt: fix splash_cpu logos use of vd_drawrect
    
    In the (extremely unlikely) case of vd->vd_height ==
    vt_logo_sprite_height the vd_drawrect code would write outside of
    frame-buffer memory.
    
    MFC after:      1 week
    Reviewed by:    cem
    Differential Revision:  https://reviews.freebsd.org/D34220
    
    (cherry picked from commit 06296f77c5bc5ec1710a28b68b9410d192163087)
---
 sys/dev/vt/vt_cpulogos.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/vt/vt_cpulogos.c b/sys/dev/vt/vt_cpulogos.c
index c62b13a9097a..6450c89ead6d 100644
--- a/sys/dev/vt/vt_cpulogos.c
+++ b/sys/dev/vt/vt_cpulogos.c
@@ -135,8 +135,8 @@ vtterm_draw_cpu_logos(struct vt_device *vd)
 
 	a = teken_get_curattr(&tm->tm_emulator);
 	if (vd->vd_driver->vd_drawrect)
-		vd->vd_driver->vd_drawrect(vd, 0, 0, vd->vd_width,
-		    vt_logo_sprite_height, 1, a->ta_bgcolor);
+		vd->vd_driver->vd_drawrect(vd, 0, 0, vd->vd_width - 1,
+		    vt_logo_sprite_height - 1, 1, a->ta_bgcolor);
 	/*
 	 * Blank is okay because we only ever draw beasties on full screen
 	 * refreshes.