From d5974b3af53d073d7ba2b2233e7a57bd9bfcadde Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 4 Nov 2016 14:49:06 +0000 Subject: [PATCH] runtime/moninj: Don't try to pack more than 64 channels Since the status words are only 8 bytes wide, left-shifting by more than that is undefined behaviour (although it seems like we got lucky and Clang dind't decide to optimise the whole implementation away). See GitHub #601. Signed-off-by: David Nadlinger --- artiq/runtime/moninj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artiq/runtime/moninj.c b/artiq/runtime/moninj.c index 67116626f..bc3bccbb6 100644 --- a/artiq/runtime/moninj.c +++ b/artiq/runtime/moninj.c @@ -52,7 +52,8 @@ static void moninj_monitor(const ip_addr_t *addr, u16_t port) reply.ttl_levels = 0; reply.ttl_oes = 0; reply.ttl_overrides = 0; - for(i=0;i