diff options
author | Frank Palazzolo <frank@avoidspikes.com> | 2017-11-01 22:25:56 -0400 |
---|---|---|
committer | Frank Palazzolo <frank@avoidspikes.com> | 2017-11-01 22:25:56 -0400 |
commit | 156674e252e83ae5db768cfc7ae7e59bb9239499 (patch) | |
tree | 3107dc202a0f4849722d1628fd1f3f0abb7fa48c | |
parent | 95ad1a3d813596eb2e4b0fd115c546342df676f8 (diff) |
Fix potential buffer overflow
-rw-r--r-- | src/devices/video/i8275.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/video/i8275.cpp b/src/devices/video/i8275.cpp index 99081d83d59..a232776fb05 100644 --- a/src/devices/video/i8275.cpp +++ b/src/devices/video/i8275.cpp @@ -585,7 +585,8 @@ WRITE8_MEMBER( i8275_device::dack_w ) else { assert(m_buffer_idx >= 0 && m_buffer_idx < ARRAY_LENGTH(m_buffer[m_buffer_dma])); - m_buffer[m_buffer_dma][m_buffer_idx++] = data; + if (m_buffer_idx < ARRAY_LENGTH(m_buffer[m_buffer_dma])) + m_buffer[m_buffer_dma][m_buffer_idx++] = data; if (!VISIBLE_FIELD_ATTRIBUTE && ((data & 0xc0) == 0x80)) { |