From 9b401acc13a93442dda642a3fd94967c186be6cb Mon Sep 17 00:00:00 2001 From: "W. Eric Norum" Date: Thu, 15 Mar 2001 22:09:36 +0000 Subject: [PATCH] Don't pass a truncated argument buffer array to a handler function. --- src/iocsh/ioccrf.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/iocsh/ioccrf.cpp b/src/iocsh/ioccrf.cpp index b75878b49..96bae1c75 100644 --- a/src/iocsh/ioccrf.cpp +++ b/src/iocsh/ioccrf.cpp @@ -429,9 +429,7 @@ ioccrf (const char *pathname) pioccrfFuncDef = found->pFuncDef; /* - * Process arguments - * Must make local copy of pioccrfFuncDef->arg[arg] to - * ensure that this routine is thread-safe. + * Process arguments and call function */ for (int arg = 0 ; ; arg++) { char *p = (arg < argc) ? argv[arg+1] : NULL; @@ -448,7 +446,7 @@ ioccrf (const char *pathname) if (np == NULL) { fprintf (stderr, "Out of memory!\n"); argBufCapacity -= 20; - continue; + break; } argBuf = (ioccrfArgBuf *)np; }