From e03e8093b6f9a82d3bcf20972ba31de4e70a6311 Mon Sep 17 00:00:00 2001 From: Olivier Tilloy Date: Wed, 14 Apr 2010 10:50:26 +0200 Subject: Do not leak the data passed to ImageMetadata.from_buffer. --- src/exiv2wrapper.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/exiv2wrapper.hpp') diff --git a/src/exiv2wrapper.hpp b/src/exiv2wrapper.hpp index 5443f2b..2be1855 100644 --- a/src/exiv2wrapper.hpp +++ b/src/exiv2wrapper.hpp @@ -154,6 +154,8 @@ public: Image(const std::string& buffer, long size); Image(const Image& image); + ~Image(); + void readMetadata(); void writeMetadata(); @@ -230,6 +232,8 @@ public: private: std::string _filename; + Exiv2::byte* _data; + long _size; Exiv2::Image::AutoPtr _image; Exiv2::ExifData _exifData; Exiv2::IptcData _iptcData; @@ -239,7 +243,7 @@ private: // false otherwise bool _dataRead; - void _instantiate_image(Exiv2::byte* data=0, long size=0); + void _instantiate_image(); }; -- cgit