Date: Wed, 20 Feb 2002 17:50:28 +0100 (CET) From: Stefan Farfeleder <e0026813@stud3.tuwien.ac.at> To: FreeBSD-gnats-submit@freebsd.org Cc: freebsd-emulation@freebsd.org Subject: [PATCH] Two little fixes Message-ID: <20020220165028.A09F2EA17@stefan.fafoe>
next in thread | raw e-mail | index | archive | help
>Submitter-Id: current-users >Originator: Stefan Farfeleder >Organization: >Confidential: no >Synopsis: [PATCH] Two little fixes >Severity: non-critical >Priority: low >Category: i386 >Class: sw-bug >Release: FreeBSD CURRENT >Environment: System: FreeBSD stefan.fafoe 4.5-STABLE FreeBSD 4.5-STABLE #5: Sun Feb 17 00:06:38 CET 2002 root@stefan.fafoe:/usr/obj/usr/src/sys/MORDOR i386 >Description: The first patch fixes the emulation of machine instructions with the 'rep' prefix. The code failed to set the cx register to 0. The second one tries to avoid a seg-fault when a dos programs calls int 10h function 0. If doscmd wasn't invoked with -x, it will currently dump core at tty.c:2201 in the call to XAllocColor because dpy is NULL. >How-To-Repeat: >Fix: Index: src/usr.bin/doscmd/cpu.c =================================================================== RCS file: /home/ncvs/src/usr.bin/doscmd/cpu.c,v retrieving revision 1.5 diff -u -r1.5 cpu.c --- src/usr.bin/doscmd/cpu.c 2 Dec 2001 13:44:05 -0000 1.5 +++ src/usr.bin/doscmd/cpu.c 20 Feb 2002 16:44:36 -0000 @@ -276,6 +276,7 @@ R_IP = --ip; /* Move IP back to the 'rep' instruction. */ return -1; } + R_CX = 0; break; default: /* Unknown instruction, get out of here and let trap.c:sigbus() Index: src/usr.bin/doscmd/int10.c =================================================================== RCS file: /home/ncvs/src/usr.bin/doscmd/int10.c,v retrieving revision 1.6 diff -u -r1.6 int10.c --- src/usr.bin/doscmd/int10.c 12 Oct 2001 10:31:00 -0000 1.6 +++ src/usr.bin/doscmd/int10.c 20 Feb 2002 16:44:13 -0000 @@ -56,6 +56,8 @@ switch (R_AH) { case 0x00: /* Set display mode */ + if (!xmode) + goto unsupported; init_mode(R_AL); break; case 0x01: /* Define cursor */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020220165028.A09F2EA17>