slackware-current/source/l/cairo/595.patch
Patrick J Volkerding 3a7a083162 Fri Sep 20 19:25:40 UTC 2024
a/dracut-103-x86_64-2.txz:  Rebuilt.
  Include /etc/dracut.conf.d/elogind.conf to handle uaccess rules correctly.
  Thanks to LuckyCyborg.
l/cairo-1.18.2-x86_64-2.txz:  Rebuilt.
  [PATCH] cff: Don't fail if no local subs.
  Fixes printing PDFs with CUPS. Thanks to pee_bee and reddog83.
l/glib2-2.82.1-x86_64-1.txz:  Upgraded.
l/pipewire-1.2.4-x86_64-1.txz:  Upgraded.
n/NetworkManager-1.48.10-x86_64-2.txz:  Rebuilt.
  Rebuilt to pick up the new plugin directory for ppp-2.5.1.
n/bind-9.20.2-x86_64-1.txz:  Upgraded.
n/openssh-9.9p1-x86_64-1.txz:  Upgraded.
  Future deprecation notice: OpenSSH plans to remove support for the DSA
  signature algorithm in early 2025. For now, this package retains DSA
  support, but plan accordingly.
n/ppp-2.5.1-x86_64-1.txz:  Upgraded.
n/rp-pppoe-4.0-x86_64-1.txz:  Upgraded.
  Upstream has removed "ancient crufty scripts," so see HOW-TO-CONNECT in the
  documentation if you were using those to connect previously.
2024-09-20 21:58:37 +02:00

34 lines
1.1 KiB
Diff

From f19e2fe080ddcfce93c8234a919fd882f3d63362 Mon Sep 17 00:00:00 2001
From: Adrian Johnson <ajohnson@redneon.com>
Date: Fri, 13 Sep 2024 06:28:39 +0930
Subject: [PATCH] cff: Don't fail if no local subs
Fixes: #870
---
src/cairo-cff-subset.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c
index 076cb2b0a..8a7de0065 100644
--- a/src/cairo-cff-subset.c
+++ b/src/cairo-cff-subset.c
@@ -952,9 +952,13 @@ cairo_cff_font_read_private_dict (cairo_cff_font_t *font,
decode_number (operand, nominal_width);
num_subs = _cairo_array_num_elements (local_sub_index);
- *local_subs_used = _cairo_calloc_ab (num_subs, sizeof (cairo_bool_t));
- if (unlikely (*local_subs_used == NULL))
- return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+ if (num_subs > 0) {
+ *local_subs_used = _cairo_calloc_ab (num_subs, sizeof (cairo_bool_t));
+ if (unlikely (*local_subs_used == NULL))
+ return _cairo_error (CAIRO_STATUS_NO_MEMORY);
+ } else {
+ *local_subs_used = NULL;
+ }
if (num_subs < 1240)
*local_sub_bias = 107;
--
GitLab