1
0
Fork 0
mirror of https://github.com/subsurface/subsurface.git synced 2025-02-19 22:16:15 +00:00

Fix a crash on divelogs.de export

Subsurface crashes when multiple dives are selected on divelogs.de
export. The crash occurs on malloc that is called indirectly from
xmlReadMemory().

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-09-08 20:12:29 +03:00 committed by Dirk Hohndel
parent af541f7f6a
commit ce608b7ecf

View file

@ -175,7 +175,6 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
/* walk the dive list in chronological order */
int i;
struct dive *dive;
struct membuffer mb = { 0 };
for_each_dive (i, dive) {
FILE *f;
char filename[PATH_MAX];
@ -183,6 +182,7 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
const char *membuf;
xmlDoc *transformed;
struct zip_source *s;
struct membuffer mb = { 0 };
/*
* Get the i'th dive in XML format so we can process it.