Corrected a stack corruption error (that I have never seen in

practice but which was detected by AddressSanitizer.  Also
corrected a crash condition in the absence of a window;  also
hard to reproduce.
This commit is contained in:
Tim Edwards 2022-09-27 10:43:04 -04:00
parent f12a155ea7
commit 65b54e0cd5
3 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
8.3.326 8.3.327

View File

@ -698,10 +698,9 @@ calmaElementText()
static int ignore[] = { CALMA_PATHTYPE, CALMA_WIDTH, -1 }; static int ignore[] = { CALMA_PATHTYPE, CALMA_WIDTH, -1 };
char *textbody = NULL; char *textbody = NULL;
int nbytes, rtype; int nbytes, rtype;
int layer, textt, cifnum; int layer, textt, cifnum, textpres;
TileType type; TileType type;
Rect r; Rect r;
unsigned short textpres;
double dval; double dval;
int size, angle, font, pos; int size, angle, font, pos;

View File

@ -83,6 +83,7 @@ grtkGetCursorPos (mw, p)
Window win1, win2; Window win1, win2;
if (mw == NULL) mw = grCurrent.mw; if (mw == NULL) mw = grCurrent.mw;
if (mw == NULL) return FALSE;
XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)mw->w_grdata), XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)mw->w_grdata),
&win1, &win2, &x1, &y1, &win1, &win2, &x1, &y1,