From 19f426a4f4ecdc63a53c8762a656609c2f7a2038 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 20 Feb 2014 18:57:01 +0900 Subject: [PATCH] [bugfix] segv on pic_receive --- src/cont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cont.c b/src/cont.c index 52a31bcd..b3d9a6e6 100644 --- a/src/cont.c +++ b/src/cont.c @@ -228,7 +228,7 @@ pic_receive(pic_state *pic, size_t n, pic_value *argv) ci = pic->ci + 1; retc = ci->retc; - for (i = 0; i < n; ++i) { + for (i = 0; i < retc && i < n; ++i) { argv[i] = ci->fp[i]; }