Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6-0]: src/sys/arch/x68k/dev Pull up following revision(s) (reques...
details: https://anonhg.NetBSD.org/src/rev/d5ae45499fb6
branches: netbsd-6-0
changeset: 774800:d5ae45499fb6
user: riz <riz%NetBSD.org@localhost>
date: Mon Apr 29 03:29:08 2013 +0000
description:
Pull up following revision(s) (requested by isaki in ticket #881):
sys/arch/x68k/dev/ite_tv.c: revision 1.16
Fix a kernel panic by printf(1).
The 2nd byte of ISO-2022-JP must be 0x21-0x7e. Especially,
the character code less than 0x2121 causes SEGV, because a
font address points outside of the CGROM.
Reported by tsutsui@. Should be pulled up to netbsd-6.
diffstat:
sys/arch/x68k/dev/ite_tv.c | 36 ++++++++++++++++++------------------
1 files changed, 18 insertions(+), 18 deletions(-)
diffs (122 lines):
diff -r 605e55f70f7d -r d5ae45499fb6 sys/arch/x68k/dev/ite_tv.c
--- a/sys/arch/x68k/dev/ite_tv.c Mon Apr 29 03:26:34 2013 +0000
+++ b/sys/arch/x68k/dev/ite_tv.c Mon Apr 29 03:29:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ite_tv.c,v 1.15 2007/03/11 06:01:05 isaki Exp $ */
+/* $NetBSD: ite_tv.c,v 1.15.88.1 2013/04/29 03:29:08 riz Exp $ */
/*
* Copyright (c) 1997 Masaru Oki.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ite_tv.c,v 1.15 2007/03/11 06:01:05 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite_tv.c,v 1.15.88.1 2013/04/29 03:29:08 riz Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -283,10 +283,10 @@
hi = ip->save_char & 0x7f;
- if (hi >= 0x21 && hi <= 0x7e) {
+ if (hi >= 0x21 && hi <= 0x7e && ch >= 0x21 && ch <= 0x7e) {
/* multibyte character */
kf = (volatile short *)tv_kfont[hi];
- kf += (ch & 0x7f) * FONTHEIGHT;
+ kf += ch * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < FONTHEIGHT; fh++, p += ROWBYTES)
*(u_short *)p = *kf++;
@@ -312,10 +312,10 @@
hi = ip->save_char & 0x7f;
- if (hi >= 0x21 && hi <= 0x7e) {
+ if (hi >= 0x21 && hi <= 0x7e && ch >= 0x21 && ch <= 0x7e) {
/* multibyte character */
kf = (volatile short *)tv_kfont[hi];
- kf += (ch & 0x7f) * FONTHEIGHT;
+ kf += ch * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < FONTHEIGHT; fh++, p += ROWBYTES)
*(u_short *)p = ~*kf++;
@@ -341,10 +341,10 @@
hi = ip->save_char & 0x7f;
- if (hi >= 0x21 && hi <= 0x7e) {
+ if (hi >= 0x21 && hi <= 0x7e && ch >= 0x21 && ch <= 0x7e) {
/* multibyte character */
kf = (volatile short *)tv_kfont[hi];
- kf += (ch & 0x7f) * FONTHEIGHT;
+ kf += ch * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < FONTHEIGHT; fh++, p += ROWBYTES) {
ch = *kf++;
@@ -388,10 +388,10 @@
hi = ip->save_char & 0x7f;
- if (hi >= 0x21 && hi <= 0x7e) {
+ if (hi >= 0x21 && hi <= 0x7e && ch >= 0x21 && ch <= 0x7e) {
/* multibyte character */
kf = (volatile short *)tv_kfont[hi];
- kf += (ch & 0x7f) * FONTHEIGHT;
+ kf += ch * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < UNDERLINE; fh++, p += ROWBYTES)
*(u_short *)p = *kf++;
@@ -425,10 +425,10 @@
hi = ip->save_char & 0x7f;
- if (hi >= 0x21 && hi <= 0x7e) {
+ if (hi >= 0x21 && hi <= 0x7e && ch >= 0x21 && ch <= 0x7e) {
/* multibyte character */
kf = (volatile short *)tv_kfont[hi];
- kf += (ch & 0x7f) * FONTHEIGHT;
+ kf += ch * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < FONTHEIGHT; fh++, p += ROWBYTES) {
ch = *kf++;
@@ -458,10 +458,10 @@
hi = ip->save_char & 0x7f;
- if (hi >= 0x21 && hi <= 0x7e) {
+ if (hi >= 0x21 && hi <= 0x7e && ch >= 0x21 && ch <= 0x7e) {
/* multibyte character */
kf = (volatile short *)tv_kfont[hi];
- kf += (ch & 0x7f) * FONTHEIGHT;
+ kf += ch * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < UNDERLINE; fh++, p += ROWBYTES)
*(u_short *)p = ~*kf++;
@@ -495,10 +495,10 @@
hi = ip->save_char & 0x7f;
- if (hi >= 0x21 && hi <= 0x7e) {
+ if (hi >= 0x21 && hi <= 0x7e && ch >= 0x21 && ch <= 0x7e) {
/* multibyte character */
kf = (volatile short *)tv_kfont[hi];
- kf += (ch & 0x7f) * FONTHEIGHT;
+ kf += ch * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < UNDERLINE; fh++, p += ROWBYTES) {
ch = *kf++;
@@ -542,10 +542,10 @@
hi = ip->save_char & 0x7f;
- if (hi >= 0x21 && hi <= 0x7e) {
+ if (hi >= 0x21 && hi <= 0x7e && ch >= 0x21 && ch <= 0x7e) {
/* multibyte character */
kf = (volatile short *)tv_kfont[hi];
- kf += (ch & 0x7f) * FONTHEIGHT;
+ kf += ch * FONTHEIGHT;
/* draw plane */
for (fh = 0; fh < UNDERLINE; fh++, p += ROWBYTES) {
ch = *kf++;
Home |
Main Index |
Thread Index |
Old Index