Read about our upcoming Code of Conduct on this issue

Commit 163dc37f authored by alex@thinkpad's avatar alex@thinkpad
Browse files

MPU spells: fix possible buffer overflow when interpreting messages

branch : qemu
parent 25a911d251a8
......@@ -180,7 +180,8 @@ static void mpu_start_sending(EOSState *s)
static int match_spell(uint16_t * received, uint16_t * in_spell)
int n = in_spell[0];
int n = MIN(in_spell[0], received[0]);
for (int i = 0; i < n; i++)
uint8_t in_lo = in_spell[i] & 0xFF;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment