зеркало из https://github.com/mono/ikvm-fork.git
Bug fix. ZipFile.getEntry() should return a copy that doesn't reference the underlying extra byte array (note that the ZipEntry "copy" constructor does not make a copy of the extra byte array).
This commit is contained in:
Родитель
7702563a63
Коммит
75b7458a87
|
@ -92,12 +92,7 @@ public class ZipEntry implements ZipConstants, Cloneable
|
|||
*/
|
||||
public ZipEntry(ZipEntry e)
|
||||
{
|
||||
this(e, e.name);
|
||||
}
|
||||
|
||||
ZipEntry(ZipEntry e, String name)
|
||||
{
|
||||
this.name = name;
|
||||
name = e.name;
|
||||
time = e.time;
|
||||
crc = e.crc;
|
||||
size = e.size;
|
||||
|
|
|
@ -318,7 +318,7 @@ public class ZipFile implements ZipConstants
|
|||
// If we didn't find it, maybe it's a directory.
|
||||
if (entry == null && !name.endsWith("/"))
|
||||
entry = entries.get(name + '/');
|
||||
return entry != null ? new ZipEntry(entry, name) : null;
|
||||
return entry != null ? (ZipEntry)entry.clone() : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче