GNU-style archives store long file names separated by newlines. The
last file name is not followed by a newline. This change stops the
search for the newline at the end of the string table, which avoids
a crash.
Fixes PR37244.
Differential D46214
Avoid reading past end of archive looking for long file name inglorion on Apr 27 2018, 2:58 PM. Authored by
Details
GNU-style archives store long file names separated by newlines. The Fixes PR37244.
Diff Detail
Event Timeline
Comment Actions A test case for this would be an archive with a long file name at the end of the string table. It may have to be a specific size to tickle the problem I'm trying to fix here, to prevent MemoryBuffer or the OS from padding the archive with 0 bytes, which would avoid the problem. Unfortunately, I have to catch a plane and I'll be gone for a week. If anyone wants to commandeer this and land it, please go ahead. |
This should be an error, no?