[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bochs-cvs
Subject:    [Bochs-cvs] [13423] trunk/bochs/cpu/decoder
From:       sshwarts--- via Bochs-cvs <bochs-cvs () lists ! sourceforge ! net>
Date:       2017-12-31 21:22:04
Message-ID: 1514755324.871810.4317 () sfp-scm-8 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 13423
Author:   sshwarts
Date:     2017-12-31 21:22:04 +0000 (Sun, 31 Dec 2017)
Log Message:
-----------
fixed buffer overflow when printing instruction disasm for opcode bytes which cannot be decoded

Modified Paths:
--------------
    trunk/bochs/cpu/decoder/fetchdecode32.cc
    trunk/bochs/cpu/decoder/fetchdecode64.cc

Modified: trunk/bochs/cpu/decoder/fetchdecode32.cc
===================================================================
--- trunk/bochs/cpu/decoder/fetchdecode32.cc	2017-12-31 16:52:02 UTC (rev 13422)
+++ trunk/bochs/cpu/decoder/fetchdecode32.cc	2017-12-31 21:22:04 UTC (rev 13423)
@@ -2639,6 +2639,7 @@
 int fetchDecode32(const Bit8u *iptr, bx_bool is_32, bxInstruction_c *i, unsigned remainingInPage)
 {
   if (remainingInPage > 15) remainingInPage = 15;
+  i->setILen(remainingInPage);
 
   unsigned remain = remainingInPage; // remain must be at least 1
   unsigned b1;

Modified: trunk/bochs/cpu/decoder/fetchdecode64.cc
===================================================================
--- trunk/bochs/cpu/decoder/fetchdecode64.cc	2017-12-31 16:52:02 UTC (rev 13422)
+++ trunk/bochs/cpu/decoder/fetchdecode64.cc	2017-12-31 21:22:04 UTC (rev 13423)
@@ -2327,6 +2327,7 @@
 int fetchDecode64(const Bit8u *iptr, bxInstruction_c *i, unsigned remainingInPage)
 {
   if (remainingInPage > 15) remainingInPage = 15;
+  i->setILen(remainingInPage);
 
   unsigned remain = remainingInPage; // remain must be at least 1
   unsigned b1;


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic