Prevent Okular from crashing when synctex logs an error
bd20e48c updated Okular's copy of the synctex code to 1.19. Unfortunately since this version the upstream code logs errors like `"! SyncTeX Error : Ignored record...` when accessing selected synctex files created with older versions of synctex. The upstream `_synctex_log` contains `va_list arg` as a parameter, but fails to initialize and tear down this properly via `va_start` and `va_end`. In general this seems to work for the single argument case. However, once we apply our hardening patch to get rid of the `gnu_printf format attribute` warning and thus introduce a variadic argument, things go wrong. To fix this, we add the missing code. The remaining changes are just refreshing the patches. BUG: 383915 Test Plan: Opening `empty.pdf` with `empty.synctex.gz` from https://bugs.kde.org/attachment.cgi?id=109116 located in the same folder does not lead to Okular segfaulting anymore.
parent
b6573a27
Please register or sign in to comment