From fb7215a82d5cca222ecf130bddc72f62f835c578 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 6 Dec 2011 20:14:31 +0100 Subject: Only step pointer arity steps Don't know why the 1 was there, it does however cause the buffer to overflow when decoding the atoms from rex. OTP-9799 --- lib/erl_interface/src/legacy/global_names.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/erl_interface/src/legacy/global_names.c b/lib/erl_interface/src/legacy/global_names.c index 7333d94931..db1c3e6296 100644 --- a/lib/erl_interface/src/legacy/global_names.c +++ b/lib/erl_interface/src/legacy/global_names.c @@ -94,7 +94,7 @@ char **erl_global_names(int fd, int *count) if (!(names = malloc((arity * sizeof(char**)) + (size-index)))) return NULL; /* arity pointers first, followed by s */ - s = (char *)(names+arity+1); + s = (char *)(names+arity); if (count) *count = 0; for (i=0; i