summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-12-07 18:07:18 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-12-07 18:07:18 (GMT)
commit6d6c732492789c16c16f822a7b3ae1421261b86d (patch)
tree7c243f2e14a723a061ddd685238f4e9b357018fc
parent55328af8909d074b8715cb5c50453d0d6e0149e4 (diff)
downloadtcl-6d6c732492789c16c16f822a7b3ae1421261b86d.zip
tcl-6d6c732492789c16c16f822a7b3ae1421261b86d.tar.gz
tcl-6d6c732492789c16c16f822a7b3ae1421261b86d.tar.bz2
3593703 Don't crash on bad input to Tcl_PkgRequire*().
-rw-r--r--generic/tclPkg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index aed80c0..b3396e6 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -353,6 +353,10 @@ PkgRequireCore(
char *script, *pkgVersionI;
Tcl_DString command;
+ if (TCL_OK != CheckAllRequirements(interp, reqc, reqv)) {
+ return NULL;
+ }
+
/*
* It can take up to three passes to find the package: one pass to run the
* "package unknown" script, one to run the "package ifneeded" script for