-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Possible buffer overflow in TF1 / TString #8136
Copy link
Copy link
Closed
Labels
Description
Address sanitizer uncovered an unprotected memcpy happening here:
root/core/base/src/TString.cxx
Lines 127 to 136 in 08cbc9b
| TString::TString(const char *cs, Ssiz_t n) | |
| { | |
| if (n < 0) { | |
| Error("TString::TString", "Negative length!"); | |
| Zero(); | |
| return; | |
| } | |
| char *data = Init(n, n); | |
| memcpy(data, cs, n); | |
| } |
Invoked from here:
Line 535 in 08cbc9b
| if (TString(formula, 5) == "CONV(" && formula[strlen(formula) - 1] == ')') { |
Note that it's always 5 characters being copied from the incoming string formula.
Reactions are currently unavailable