diff --git a/generic/threadPoolCmd.c b/generic/threadPoolCmd.c
index 4fc3d86..7c80554 100644
--- a/generic/threadPoolCmd.c
+++ b/generic/threadPoolCmd.c
@@ -363,7 +363,9 @@ TpoolPostObjCmd(dummy, interp, objc, objv)
             goto usage;
         }
     }
-
+    if (ii + 2 != objc) {
+        goto usage;
+    }
     tpoolName = Tcl_GetString(objv[ii]);
     script    = Tcl_GetString(objv[ii+1]);
     len = objv[ii+1]->length;
