TGFileDialog stack corrupt if filetype filter is >=64 chars

I’m using Root 5.26 (on both windows and linux).

I use some long filetype filters for TGFileDialog open, and I get a stack corrupted error if the filter is >= 64 characters.

I believe the offending code is in tgfiledialog.cxx at line #255 :
char s[64];
for (i = 0; fFileInfo->fFileTypes[i] != 0; i += 2) {
sprintf(s, “%s (%s)”, fFileInfo->fFileTypes[i], fFileInfo->fFileTypes[i+1]);
fTypes->AddEntry(s, i);
}

I’m guessing the 64 is arbitrary, so could you increase it in the next version?

Thanks very much,
buddy

Hi buddy,

This has been fixed by the revision 32579 on March 12. But thanks for the report anyway!

Cheers, Bertrand.