Module Name: src Committed By: rin Date: Fri Nov 19 23:50:39 UTC 2021
Modified Files: src/sys/dev/wsfont: wsfont.c Log Message: wsfont_rotate(): Add missing NULL check for wsfont_find0(). To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/dev/wsfont/wsfont.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/wsfont/wsfont.c diff -u src/sys/dev/wsfont/wsfont.c:1.71 src/sys/dev/wsfont/wsfont.c:1.72 --- src/sys/dev/wsfont/wsfont.c:1.71 Mon Nov 23 12:15:39 2020 +++ src/sys/dev/wsfont/wsfont.c Fri Nov 19 23:50:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: wsfont.c,v 1.71 2020/11/23 12:15:39 rin Exp $ */ +/* $NetBSD: wsfont.c,v 1.72 2021/11/19 23:50:39 rin Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.71 2020/11/23 12:15:39 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.72 2021/11/19 23:50:39 rin Exp $"); #include "opt_wsfont.h" @@ -563,6 +563,9 @@ wsfont_rotate(int cookie, int rotate) origfont = wsfont_find0(cookie, 0xffffffff); splx(s); + if (origfont == NULL) + return (-1); + switch (rotate) { case WSFONT_ROTATE_CW: font = wsfont_rotate_cw_internal(origfont->font);