Document viewer
Find a file
Pekka Ristola 41e504a7be
Fix use of uninitialized value
Contents of string `content` are unitialized before copying of `dummy_content`.
Using `g_strlcat` appends `dummy_content` to the uninitialized junk, and
by changing that to `strcpy` the uninitialized values aren't used.

Relevant Valgrind error when running zathura with no arguments:
```
==15845== Conditional jump or move depends on uninitialised value(s)
==15845==    at 0x566EB2D: UnknownInlinedFun (gstrfuncs.c:1534)
==15845==    by 0x566EB2D: g_strlcat (gstrfuncs.c:1521)
==15845==    by 0x12B16D: zathura_db_read_key_file_from_file (database-plain.c:171)
==15845==    by 0x12D39D: UnknownInlinedFun (database-plain.c:295)
==15845==    by 0x12D39D: plain_set_property (database-plain.c:371)
==15845==    by 0x55C17AD: object_set_property (gobject.c:1607)
==15845==    by 0x55C1C1C: g_object_new_internal (gobject.c:2047)
==15845==    by 0x55C3307: g_object_new_valist (gobject.c:2355)
==15845==    by 0x55C383D: g_object_new (gobject.c:1824)
==15845==    by 0x117944: UnknownInlinedFun (database-plain.c:226)
==15845==    by 0x117944: init_database (zathura.c:373)
==15845==    by 0x11B8EA: zathura_init (zathura.c:473)
==15845==    by 0x114B99: UnknownInlinedFun (main.c:111)
==15845==    by 0x114B99: main (main.c:282)
```
2022-08-20 14:38:37 +03:00
data Fix build with meson 0.60 2021-10-30 15:41:25 +02:00
doc update documentation 2022-05-08 14:29:06 +02:00
po Update translations 2022-05-07 23:56:26 +02:00
subprojects Add CI 2020-01-05 14:21:51 +01:00
tests Bump minimum check version to 0.11 2021-09-20 00:09:03 +02:00
zathura Fix use of uninitialized value 2022-08-20 14:38:37 +03:00
.clang-format Add clang-format configuration 2022-05-07 23:10:28 +02:00
.gitignore Add CI 2020-01-05 14:21:51 +01:00
.gitlab-ci.yml CI: fix target name 2022-05-08 14:52:16 +02:00
AUTHORS Acknowledge Jeremie Knuesel 2018-03-18 22:09:20 +01:00
LICENSE Bump copyright years 2020-01-06 09:00:44 +01:00
meson.build Make magic a required dependency 2022-05-08 15:43:16 +02:00
meson_options.txt Make magic a required dependency 2022-05-08 15:43:16 +02:00
README.md Make magic a required dependency 2022-05-08 15:43:16 +02:00

zathura - a document viewer

zathura is a highly customizable and functional document viewer based on the girara user interface library and several document libraries.

Requirements

The following dependencies are required:

  • gtk3 (>= 3.22)
  • glib (>= 2.50)
  • girara (>= 0.3.7)
  • libmagic from file(1): for mime-type detection

The following dependencies are optional:

  • sqlite3 (>= 3.6.23): splite3 database backend
  • libsynctex from TeXLive (>= 1.19): SyncTeX support
  • libseccomp: sandbox support

For building zathura, the following dependencies are also required:

  • meson (>= 0.56)
  • gettext

The following dependencies are optional build-time only dependencies:

  • check (>= 0.11): for tests
  • librvsg-bin: PNG icons
  • Sphinx: manpages and HTML documentation
  • doxygen: HTML documentation
  • breathe: for HTML documentation
  • sphinx_rtd_theme: for HTML documentation

Note that Sphinx is needed to build the manpages. If it is not installed, the man pages won't be built. For building the HTML documentation, doxygen, breathe and sphinx_rtd_theme are needed in addition to Sphinx.

If you don't want to build with support for sqlite databases, you can configure the build system with -Dsqlite=disabled and sqlite support won't be available.

The use of magic to detect mime types is optional and can be disabled by configuring the build system with -Dmagic=disabled.

The use of libseccomp to create a sandboxed environment is optional and can be disabled by configure the build system with -Dseccomp=disabled. The sandbox will by default be set to "normal" mode, which should not interfere with the normal operation of zathura. For strict sandbox mode set sandbox strict in zathurarc. Strict sandbox mode will reduce the available functionality of zathura and provide a read only document viewer.

Installation

To build and install zathura using meson's ninja backend:

meson build
cd build
ninja
ninja install

Note that the default backend for meson might vary based on the platform. Please refer to the meson documentation for platform specific dependencies.

Bugs

Please report bugs at http://git.pwmt.org/pwmt/zathura.