Skip to content

Commit d86c2b1

Browse files
Fabio Luongodpiparo
Fabio Luongo
authored andcommitted
Fix buffer overflow when opening the Fit Panel
1 parent d941588 commit d86c2b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: gui/gui/src/TGNumberEntry.cxx

+2-2
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,13 @@ static char *RealToStr(char *text, const RealInfo_t & ri)
305305
StrInt(p, TMath::Abs(ri.fIntNum), 0);
306306
p += strlen(p);
307307
if ((ri.fStyle == kRSFrac) || (ri.fStyle == kRSFracExpo)) {
308-
strlcpy(p, ".", 256-strlen(p));
308+
strlcpy(p, ".", 256-strlen(text));
309309
p++;
310310
StrInt(p, TMath::Abs(ri.fFracNum), ri.fFracDigits);
311311
p += strlen(p);
312312
}
313313
if ((ri.fStyle == kRSExpo) || (ri.fStyle == kRSFracExpo)) {
314-
strlcpy(p, "e", 256-strlen(p));
314+
strlcpy(p, "e", 256-strlen(text));
315315
p++;
316316
StrInt(p, ri.fExpoNum, 0);
317317
p += strlen(p);

0 commit comments

Comments
 (0)