Commit c50ba661 authored by François Grisez's avatar François Grisez

Fills the body of Content objects on destruction

This commit is a duplicate of bd08e594 in master
parent e2013f1a
......@@ -53,6 +53,13 @@ Content::Content (ContentPrivate &p) : ClonableObject(p) {
}
Content::~Content () {
L_D();
/* Fills the body with zeros before releasing since it may contain
private data like cipher keys or decoded messages. */
d->body.assign(d->body.size(), 0);
}
Content &Content::operator= (const Content &src) {
L_D();
if (this != &src) {
......
......@@ -40,6 +40,7 @@ public:
Content ();
Content (const Content &src);
Content (Content &&src);
~Content ();
Content &operator= (const Content &src);
Content &operator= (Content &&src);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment