libgpg-error, w32: logging crashes on unmatched %s on window
Closed, ResolvedPublic

Description

For a broken translation where the translation contains a %s which is not part of the original message gpg-error crashes on windows (T4053)

On linux it is handled more gracefully as the %s is replaced by a "(null)".

e.g.
gpg: Entschlüsselung als fehlgeschlagen angesehen: (null)

aheinecke created this task.Jul 4 2018, 5:50 PM
aheinecke renamed this task from libgpg-error: w32 gettext crashes on unmatched %s in translation to libgpg-error, w32: logging crashes on unmatched %s on window.Jul 4 2018, 6:06 PM
aheinecke added a project: Windows.
aheinecke reassigned this task from aheinecke to werner.Jul 4 2018, 6:26 PM

Well I'm pretty sure the reason is that valuetable_buffer is not inialized in _gpgrt_estream_format. But the resulting behavior confused me. It would not crash. But it would also not print "gpg: Entschlüsselung als fehlgeschlagen angesehen: (null)" It would just print nothing instead of that string.

So I think I'm missing something here -> werner

werner added a comment.Jul 4 2018, 8:04 PM

Printing "(null)" is just coincidence because NULL is stored at the respective stack address on one platform.

The real question is why msgmerge didn't fail for that wrong translation or why that went unnoticed.

aheinecke closed this task as Resolved.Jul 5 2018, 8:56 AM

IMO this can be closed. At least the problem for which I intended this ticket is fixed.

That msgmerge didn't detect it would be another issue or at least better handled in T4053