summaryrefslogtreecommitdiff
path: root/libc/inet/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet/rpc')
-rw-r--r--libc/inet/rpc/ruserpass.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libc/inet/rpc/ruserpass.c b/libc/inet/rpc/ruserpass.c
index 0adcbf1d3..b18bbf5b7 100644
--- a/libc/inet/rpc/ruserpass.c
+++ b/libc/inet/rpc/ruserpass.c
@@ -40,6 +40,7 @@
#include <stdio_ext.h>
#include <stdlib.h>
#include <string.h>
+#include <malloc.h>
#include <strings.h>
#include <unistd.h>
@@ -79,7 +80,7 @@ static FILE *cfile;
#define ID 10
#define MACHINE 11
-static char tokval[100];
+static char *tokval; /* [100] */
static const char tokstr[] =
{
@@ -152,6 +153,9 @@ int ruserpass(const char *host, const char **aname, const char **apass)
if (mydomain==NULL) {
mydomain=myname + strlen(myname);
}
+
+ if (!tokval)
+ tokval = __uc_malloc(100);
next:
while ((t = token())) switch(t) {