Skip to content

Commit

Permalink
Fix buffer overflow when opening the Fit Panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio Luongo committed Nov 12, 2024
1 parent 990c31e commit 611fa16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/gui/src/TGNumberEntry.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,13 @@ static char *RealToStr(char *text, const RealInfo_t & ri)
StrInt(p, TMath::Abs(ri.fIntNum), 0);
p += strlen(p);
if ((ri.fStyle == kRSFrac) || (ri.fStyle == kRSFracExpo)) {
strlcpy(p, ".", 256-strlen(p));
strlcpy(p, ".", 256-strlen(text));
p++;
StrInt(p, TMath::Abs(ri.fFracNum), ri.fFracDigits);
p += strlen(p);
}
if ((ri.fStyle == kRSExpo) || (ri.fStyle == kRSFracExpo)) {
strlcpy(p, "e", 256-strlen(p));
strlcpy(p, "e", 256-strlen(text));
p++;
StrInt(p, ri.fExpoNum, 0);
p += strlen(p);
Expand Down

0 comments on commit 611fa16

Please sign in to comment.