diff options
| author | jakllsch <jakllsch@NetBSD.org> | 2019-03-01 23:14:13 +0000 |
|---|---|---|
| committer | jakllsch <jakllsch@NetBSD.org> | 2019-03-01 23:14:13 +0000 |
| commit | 2fb8327c76a4e8f33c1f854fff06d7d04dd56c70 (patch) | |
| tree | 5993f6993e5f6da1a95bbc5663156eedfeaa1aa5 /sys/dev/rasops | |
| parent | 069165b6ef8ae3cf5a72961e07a5f56bcd9365b9 (diff) | |
Reset 'height' before underlining in rasops32_putchar_aa().
Prevents segfault when underlining whitespace in the upper left cell.
Diffstat (limited to 'sys/dev/rasops')
| -rw-r--r-- | sys/dev/rasops/rasops32.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/rasops/rasops32.c b/sys/dev/rasops/rasops32.c index 07b0d68589d..ff22418edfe 100644 --- a/sys/dev/rasops/rasops32.c +++ b/sys/dev/rasops/rasops32.c @@ -1,4 +1,4 @@ -/* $NetBSD: rasops32.c,v 1.29 2013/09/15 09:39:47 martin Exp $ */ +/* $NetBSD: rasops32.c,v 1.30 2019/03/01 23:14:13 jakllsch Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.29 2013/09/15 09:39:47 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops32.c,v 1.30 2019/03/01 23:14:13 jakllsch Exp $"); #include "opt_rasops.h" @@ -237,6 +237,7 @@ rasops32_putchar_aa(void *cookie, int row, int col, u_int uc, long attr) /* Do underline */ if ((attr & 1) != 0) { rp = (uint32_t *)rrp; + height = font->fontheight; DELTA(rp, (ri->ri_stride * (height - 2)), int32_t *); while (width--) *rp++ = clr[1]; |
