From 65b54e0cd5b7f24ceeb31ee78c35412d9b0744f3 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 27 Sep 2022 10:43:04 -0400 Subject: [PATCH] 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. --- VERSION | 2 +- calma/CalmaRdpt.c | 3 +-- graphics/grTk4.c | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index d53f7713..9355be9e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.326 +8.3.327 diff --git a/calma/CalmaRdpt.c b/calma/CalmaRdpt.c index 951df9cd..6c2cec4c 100644 --- a/calma/CalmaRdpt.c +++ b/calma/CalmaRdpt.c @@ -698,10 +698,9 @@ calmaElementText() static int ignore[] = { CALMA_PATHTYPE, CALMA_WIDTH, -1 }; char *textbody = NULL; int nbytes, rtype; - int layer, textt, cifnum; + int layer, textt, cifnum, textpres; TileType type; Rect r; - unsigned short textpres; double dval; int size, angle, font, pos; diff --git a/graphics/grTk4.c b/graphics/grTk4.c index bff58098..207f5359 100644 --- a/graphics/grTk4.c +++ b/graphics/grTk4.c @@ -83,6 +83,7 @@ grtkGetCursorPos (mw, p) Window win1, win2; if (mw == NULL) mw = grCurrent.mw; + if (mw == NULL) return FALSE; XQueryPointer(grXdpy, Tk_WindowId((Tk_Window)mw->w_grdata), &win1, &win2, &x1, &y1,