Skip to content

Commit a75ffa9

Browse files
committed
[io] use safer overload of TKey::ReadKeyBuffer() in TFile::Recover()
This prevents potential oob stack reads in case of corrupted TFiles
1 parent aa52b32 commit a75ffa9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io/io/src/TFile.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,7 @@ Int_t TFile::Recover()
21712171
if (seekpdir == fSeekDir && tclass && !tclass->InheritsFrom(TFile::Class())
21722172
&& strcmp(classname,"TBasket")) {
21732173
TKey *key = new TKey(this);
2174-
key->ReadKeyBuffer(bufread);
2174+
key->ReadKeyBuffer(bufread, sizeof(header));
21752175
if (!strcmp(key->GetName(),"StreamerInfo")) {
21762176
fSeekInfo = seekkey;
21772177
SafeDelete(fInfoCache);

0 commit comments

Comments
 (0)