From 92c8708a732b0bc899e47f3960f693d01baa5f26 Mon Sep 17 00:00:00 2001
From: Mick Jordan <mick.jordan@oracle.com>
Date: Fri, 22 Jul 2016 08:07:44 -0700
Subject: [PATCH] buffer bug fix in Rembedded.c

---
 com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c b/com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c
index ef04a3a5ba..61431ad1d6 100644
--- a/com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c
+++ b/com.oracle.truffle.r.native/fficall/src/jni/Rembedded.c
@@ -526,6 +526,7 @@ static char *get_classpath(char *r_home) {
 				break;
 			} else {
 				bufptr += count;
+				max -= count;
 			}
 		}
 		close(pipefd[0]);
-- 
GitLab