summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-12-10 22:53:02 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-10 22:35:13 +0100
commit643f4040368cd94d261cc286fb6263487fa2eedb (patch)
tree4c0c28ab588848bc2d42c5556eab77fa9f767396 /Documentation
parent5ebcc2d237ec42545b6bf21003dafc10358aeb31 (diff)
downloadsubsurface-643f4040368cd94d261cc286fb6263487fa2eedb.tar.gz
Divelogs.de: prevent undefined behaviour
prepare_dives_for_divelogs() did a silly thing, which I was responsible for. When populating 'tempfile' we benefit from QString, but then return a pointer to a local variable (char *) without alocating it on the heap. This resulted in undefined behavior, as we don't know the lifespan of that local memory on the stack. Patch fixes that by using strdup() and freeing the memory when/if needed. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions