From 75eccffbec71a90ec93fa609eda6c9f34a77b7a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Thu, 20 Mar 2014 09:58:24 +0000 Subject: [PATCH] added assert for nbmj8688.c AddressSanitizer heap-buffer-overflow (nw) --- src/emu/video/hd61830.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/emu/video/hd61830.c b/src/emu/video/hd61830.c index 73668892225..b50d1773bc7 100644 --- a/src/emu/video/hd61830.c +++ b/src/emu/video/hd61830.c @@ -380,6 +380,8 @@ UINT16 hd61830_device::draw_scanline(bitmap_ind16 &bitmap, const rectangle &clip for (int x = 0; x < m_hp; x++) { bitmap.pix16(y, (sx * m_hp) + x) = BIT(data1, x); + assert(y >= 0 && y < bitmap.height()); + assert(((sx * m_hp) + x + m_hp) >= 0 && ((sx * m_hp) + x + m_hp) < bitmap.width()); bitmap.pix16(y, (sx * m_hp) + x + m_hp) = BIT(data2, x); } }