Change in ovirt-engine[ovirt-engine-4.0]: core: Avoid an infinite loop when untar an entry

tnisan at redhat.com tnisan at redhat.com
Wed Jun 1 07:11:03 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: core: Avoid an infinite loop when untar an entry
......................................................................


core: Avoid an infinite loop when untar an entry

Avoid going into infinite loop in case there is an error during an entry
extraction from a tar archive.
For example if the tar contains a corrupted or simply an empty file,
this will trigger the infinite loop. The fix will just skip to the next
entry and will add empty files into the archive (we reflect the tar
entries and not ignoring them)

Change-Id: I64a8d019cb5c13df19ee21eecb2ab81b42a9b3cc
Bug-Url: https://bugzilla.redhat.com/1167262
Signed-off-by: Roy Golan <rgolan at redhat.com>
---
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/OvfUtils.java
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/archivers/tar/TarInMemoryExport.java
A backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/archivers/tar/TarInMemoryExportTest.java
A backend/manager/modules/utils/src/test/resources/mixed-content.tar
A backend/manager/modules/utils/src/test/resources/non-empty.tar
A backend/manager/modules/utils/src/test/resources/tar-with-empty-file.tar
6 files changed, 83 insertions(+), 7 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Roy Golan: Verified
  Maor Lipchuk: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/58343
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I64a8d019cb5c13df19ee21eecb2ab81b42a9b3cc
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list