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:
parent
af541f7f6a
commit
ce608b7ecf
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,6 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
|
||||||
/* walk the dive list in chronological order */
|
/* walk the dive list in chronological order */
|
||||||
int i;
|
int i;
|
||||||
struct dive *dive;
|
struct dive *dive;
|
||||||
struct membuffer mb = { 0 };
|
|
||||||
for_each_dive (i, dive) {
|
for_each_dive (i, dive) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char filename[PATH_MAX];
|
char filename[PATH_MAX];
|
||||||
|
@ -183,6 +182,7 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile,
|
||||||
const char *membuf;
|
const char *membuf;
|
||||||
xmlDoc *transformed;
|
xmlDoc *transformed;
|
||||||
struct zip_source *s;
|
struct zip_source *s;
|
||||||
|
struct membuffer mb = { 0 };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the i'th dive in XML format so we can process it.
|
* Get the i'th dive in XML format so we can process it.
|
||||||
|
|
Loading…
Add table
Reference in a new issue