From a5b5eb0f8094d609728369f2b7fd58fc01fa05ad Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Wed, 3 Jan 2024 22:50:15 +0100 Subject: [PATCH] lib/DtTerm: Fix copy&paste error This avoids using an uninitialized variable by using the initialized variable that is obviously the right one in the context. --- cde/lib/DtTerm/Term/TermParse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cde/lib/DtTerm/Term/TermParse.c b/cde/lib/DtTerm/Term/TermParse.c index 7649ce84c..9b3aba174 100644 --- a/cde/lib/DtTerm/Term/TermParse.c +++ b/cde/lib/DtTerm/Term/TermParse.c @@ -2196,8 +2196,8 @@ _DtTermParseSunMisc /* Misc sun esc seqs */ case 21: XtVaGetValues(sw,XmNtitle, &title, NULL); fmt = "\033]l%s\033\\"; - if (strlen(icon) + strlen(fmt) + 1 >= sizeof(buf)) - s = XtMalloc(strlen(icon) + strlen(fmt) + 1); + if (strlen(title) + strlen(fmt) + 1 >= sizeof(buf)) + s = XtMalloc(strlen(title) + strlen(fmt) + 1); else s = buf; sprintf(s, "%s", fmt);