Skip to content

Calls to XmpFile::close can abort process if C++ XMP Toolkit throws an exception #233

@scouten-adobe

Description

@scouten-adobe

When calling XmpFile::close, any situation which would cause the underlying C++ code to raise an exception resulted in a process abort because there was no code to translate the C++ exception to a Rust error result.

This is best demonstrated in #230, where a race condition caused the close call to fail due to file I/O errors.

This was fixed in #232 (crate version 1.9.0), which now safely handles the exception.

For backward compatibility, the existing API ignores the error. A new api XmpFile::try_close was added to allow callers to receive and process the error result.

Users of all prior versions of xmp_toolkit are encouraged to update to version 1.9.0 to avoid possible process aborts.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions