road to 4.9

Linus Torvalds torvalds at linux-foundation.org
Sun Jul 14 10:18:52 PDT 2019


On Sun, Jul 14, 2019 at 6:16 AM Steve <stevewilliams at internode.on.net> wrote:
>
> (gdb) where
> #0  0x0000000000708fcd in save_cylinder_info (dive=0xc34f240, b=0x7fffffffc2c0) at /home/steve/src/subsurface/core/save-xml.c:193

Interesting. It looks like you likely have an odd cylinder "use"
string that you load, resulting in cylinder->use being an invalid
value.

It might be some translation thing (but the use strings *shouldn't* be
translated, even if we have some bad QT_TRANSLATE_NOOP()) markers
there, but since you're first loading and then saving, maybe the old
load-file has some buggy tranbslated value.

We try to untranslate at load time, but that depends on the locale
being the same as the saving locale had been. Which it probably isn't
for you. Just based on the name/email I'm guessing Australia -
Adelaide? - and English. But at some point you had tested some
localization, and your old file thus had an illegible cylinder use
string.

Anyway, the save_cylinder_info() code doesn't check for invalid
cylinder use numbers, and can do bad things if they are garbage.

Maybe a patch like the attached?

                  Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 2157 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20190714/afe363ef/attachment.bin>


More information about the subsurface mailing list