Tcl Source Code

Check-in [ee35495951]
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 | trunk
Files: files | file ages | folders
SHA1: ee3549595135138d7a481c23900f341175919383
User & Date: dgp 2012-12-07 18:08:48
Context
2012-12-07
21:36
only set tclStubsPtr if all version checks pass check-in: 54e473087a user: jan.nijtmans tags: trunk
19:26
merge trunk check-in: 1362ee01f0 user: dgp tags: core-8-6-0-rc
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
17:03
Source compat, rather than stubs compat demo. check-in: 782e6b36ec user: dgp tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tclPkg.c.

351
352
353
354
355
356
357




358
359
360
361
362
363
364
    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.
     */







>
>
>
>







351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
    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.
     */