Tk Source Code

Check-in [76f519fd]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Sep 9.

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

Overview
Comment:[d186605d05] Stop invalid read beyond objv.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1:76f519fd916ed24cc02ea2e92bfaa823d13fef7f
User & Date: dgp 2015-02-05 20:11:30
Context
2015-02-06
14:09
[a6c2807c13] Don't let forgotten slave trick us into layout computations outside the layout grid. check-in: 32b68cb7 user: dgp tags: core-8-5-branch
2015-02-05
22:26
Merge updates from core-8-5-branch. Closed-Leaf check-in: 5e405150 user: mistachkin tags: bindScriptCount
21:50
Merged core-8-5-branch check-in: d6c514d2 user: fvogel tags: text-elided
20:13
[d186605d05] Stop invalid read beyond objv. check-in: 6c910563 user: dgp tags: trunk
20:11
[d186605d05] Stop invalid read beyond objv. check-in: 76f519fd user: dgp tags: core-8-5-branch
2015-02-02
14:27
Remove Mac-specific idle handler in tkTextDisp.c that caused delay in text redraw during scrolling; no longer needed check-in: 7f91299d user: kevin_walzer tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkFont.c.

3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
....
3030
3031
3032
3033
3034
3035
3036

3037
3038
3039
3040
3041
3042
3043
{
    int i, n, index;
    Tcl_Obj *optionPtr, *valuePtr;
    char *value;

    for (i = 0; i < objc; i += 2) {
	optionPtr = objv[i];
	valuePtr = objv[i + 1];

	if (Tcl_GetIndexFromObj(interp, optionPtr, fontOpt, "option", 1,
		&index) != TCL_OK) {
	    return TCL_ERROR;
	}
	if ((i+2 >= objc) && (objc & 1)) {
	    /*
................................................................................

	    if (interp != NULL) {
		Tcl_AppendResult(interp, "value for \"",
			Tcl_GetString(optionPtr), "\" option missing", NULL);
	    }
	    return TCL_ERROR;
	}


	switch (index) {
	case FONT_FAMILY:
	    value = Tcl_GetString(valuePtr);
	    faPtr->family = Tk_GetUid(value);
	    break;
	case FONT_SIZE:







<







 







>







3011
3012
3013
3014
3015
3016
3017

3018
3019
3020
3021
3022
3023
3024
....
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
{
    int i, n, index;
    Tcl_Obj *optionPtr, *valuePtr;
    char *value;

    for (i = 0; i < objc; i += 2) {
	optionPtr = objv[i];


	if (Tcl_GetIndexFromObj(interp, optionPtr, fontOpt, "option", 1,
		&index) != TCL_OK) {
	    return TCL_ERROR;
	}
	if ((i+2 >= objc) && (objc & 1)) {
	    /*
................................................................................

	    if (interp != NULL) {
		Tcl_AppendResult(interp, "value for \"",
			Tcl_GetString(optionPtr), "\" option missing", NULL);
	    }
	    return TCL_ERROR;
	}
	valuePtr = objv[i + 1];

	switch (index) {
	case FONT_FAMILY:
	    value = Tcl_GetString(valuePtr);
	    faPtr->family = Tk_GetUid(value);
	    break;
	case FONT_SIZE: