Tcl Source Code

Check-in [b9b41a3719]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:3593703 Don't crash on bad input to Tcl_PkgRequire*().
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: b9b41a3719fbeef7ceadac8755c52182fd553236
User & Date: dgp 2012-12-07 18:07:18
Context
2012-12-07
21:30
only set tclStubsPtr when all version checks pass check-in: abc5f976ff user: jan.nijtmans tags: core-8-5-branch
18:08
3593703 Don't crash on bad input to Tcl_PkgRequire*(). check-in: ee35495951 user: dgp tags: trunk
18:07
3593703 Don't crash on bad input to Tcl_PkgRequire*(). check-in: b9b41a3719 user: dgp tags: core-8-5-branch
09:53
Turn pkgb.so into a Tcl9 interoperability test library: Whatever Tcl9 looks like, loading pkgb.so in... check-in: d3a1afc2a4 user: jan.nijtmans tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclPkg.c.

348
349
350
351
352
353
354




355
356
357
358
359
360
361
    Package *pkgPtr;
    PkgAvail *availPtr, *bestPtr, *bestStablePtr;
    char *availVersion, *bestVersion;
				/* Internal rep. of versions */
    int availStable, code, satisfies, pass;
    char *script, *pkgVersionI;
    Tcl_DString command;





    /*
     * 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
     * a specific version, and a final pass to lookup the package loaded by
     * the "package ifneeded" script.
     */







>
>
>
>







348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
    Package *pkgPtr;
    PkgAvail *availPtr, *bestPtr, *bestStablePtr;
    char *availVersion, *bestVersion;
				/* Internal rep. of versions */
    int availStable, code, satisfies, pass;
    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
     * a specific version, and a final pass to lookup the package loaded by
     * the "package ifneeded" script.
     */