| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes #508
|
| |
|
|
|
|
| |
Fixes #526
|
| |
|
| |
|
|
|
|
|
|
| |
Add a _cairo_tag_error(fmt, ...) function that is used liked _cairo_error()
but allows an error message to be specified. When CAIRO_DEBUG_TAG is defined
the error is printed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, forward references were required to use named destinations.
This patch is based on the patch in #336 by Guillaume Ayoub <guillaume.ayoub@kozea.fr>
that converted all links to indirect objects written at the end of the document.
I have reworked the patch so that only forward references to future page numbers are
written as indirect objects. Backward references and named destinations remain as they
are. This is to minimize the number of objects written to the PDF file.
Fixes #336
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cairo-pdf was silently ignoring write errors in
_cairo_pdf_surface_finish(). Any write errors that happened here ended
up setting a "status" variable, but the value in this variable was then
unused.
This commit fixes this bug by passing this error on to the caller.
Additionally, this also adds a test case for this behaviour based on
writing to /dev/full. This file is non-standard and thus the test first
checks that this file exists and is writable before trying to write to
it.
This bug was found based on a report from Knut Petersen [0].
[0]: https://lists.cairographics.org/archives/cairo/2021-July/029281.html
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|\
| |
| |
| |
| |
| |
| | |
[pdf-interchange] Write trees even if only LINK tags are present
Closes #487
See merge request cairo/cairo!185
|
| |
| |
| |
| |
| |
| | |
This avoids the PDF ending up with invalid xref entries for objects that were "reserved"
but then never output.
Fixes https://gitlab.freedesktop.org/cairo/cairo/-/issues/487.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The error paths in _cairo_pdf_interchange_begin_dest_tag() do not clean
up and cause some memory to be leaked. Fix this by adding the necessary
free()s.
The first hunk, the missing free(dest) was found by oss-fuzz (see link
below).
The second hunk is an obvious follow up. It also cleans up the memory
allocated by _cairo_tag_parse_dest_attributes().
The cleanup in the second hunk is similar to the function
_named_dest_pluck() in the same function, but that function also removes
the entry from a hash table. The error case here is that exactly this
hash table insertion failed. Thus, the code cannot simply use the
already existing function.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30880
Signed-off-by: Uli Schlachter <psychon@znc.in>
|
|
|
|
|
| |
The code used to unintentionally drop the minutes from the timezone
offset, see issue #392. This is now fixed.
|
|
|
|
|
|
|
|
| |
Run the command below suggested by geirha in ##sed@irc.freenode.net.
git grep -l 'http://.*cairographics.org' | xargs sed -i 's|http\(://\([[:alnum:].-]*\.\)\{0,1\}cairographics\.org\)|https\1|g'
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
|
|
|
|
|
|
|
|
|
|
| |
_cairo_malloc(0) always returns NULL, but has not been used
consistently. This patch replaces many calls to malloc() with
_cairo_malloc().
Fixes: fdo# 101547
CVE: CVE-2017-9814 Heap buffer overflow at cairo-truetype-subset.c:1299
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
|
|
|
|
|
|
|
|
|
| |
- each annotation was emitted on every page instead of just the page
that contains the annotation
- the document structure did not correctly link to annotation objects
- fix some annotation related memory leaks
|
| |
|
| |
|
| |
|
|
|
|
|
| |
In PDF outline targets are specified the same way as link targets so
there is no need to restrict the target to dest names.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Converting the link position from cairo to pdf coordinates requires
the page height. Since the link may point to a different page, build
an array of the height of each page and use the target page height for
the conversion.
Don't default to a [0,0] position if "pos" is not specified. PDF
allows a null destination position to be specified which means don't
change the position if the page is already displayed or show top left
if switching to a different page. This is more useful default
particularly for external files where the coordinates (which must be
in PDF coordinates as we don't know the page height) of the top left
corner may not be known.
|
| |
|
| |
|
| |
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=99630
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|