shithub: orca

Download patch

ref: 08f15762b64a80edd49edef5fd92da9c993408a2
parent: f2fd555b584b79c809e323ec5d8584085c45dd2d
author: cancel <cancel@cancel.fm>
date: Mon Dec 3 05:41:24 EST 2018

Fix off-by-one buffer size

--- a/sim.c
+++ b/sim.c
@@ -535,7 +535,7 @@
   // todo should at least stun the 1 column if columns is 1
   if (LOAD(len_data) && len_data[0] >= 1 && len_data[0] <= 16) {
     Usz len = (Usz)len_data[0];
-    Glyph buff[15];
+    Glyph buff[16];
     Glyph* gs = gbuffer + y * width + x + 1;
     Glyph hopped = *gs;
     // ORCA_MEMCPY(buff, gs + 1, len - 1);