From 122efe3a12418392b484b6528e8059d3f119389c Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Fri, 15 Feb 2019 15:26:44 -0600 Subject: [PATCH] drivers/vesa: Don't dereference frame_buffer when NULL * Solves the KDL side of #14905 * We do it quietly since we don't want a log event every blit Change-Id: I8e9b55fab78bd1742a4282dd0812823f33dd9f32 --- src/add-ons/kernel/drivers/graphics/vesa/vga.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/add-ons/kernel/drivers/graphics/vesa/vga.cpp b/src/add-ons/kernel/drivers/graphics/vesa/vga.cpp index ffc062941a..35f70587c5 100644 --- a/src/add-ons/kernel/drivers/graphics/vesa/vga.cpp +++ b/src/add-ons/kernel/drivers/graphics/vesa/vga.cpp @@ -39,6 +39,10 @@ status_t vga_planar_blit(vesa_shared_info *info, uint8 *src, int32 srcBPR, int32 left, int32 top, int32 right, int32 bottom) { + // If we don't actually have a frame_buffer, bail. + if (info->frame_buffer == NULL) + return B_BAD_ADDRESS; + int32 dstBPR = info->bytes_per_row; uint8 *dst = info->frame_buffer + top * dstBPR + left / 8;