sync:Fix crash with malformed document
Signed-off-by: zhangzhangxin <zhangxin1@xfusion.com>
This commit is contained in:
parent
bc35e3ac7e
commit
5bb0accb38
26
0002-sync-Fix-crash-with-malformed-document.patch
Normal file
26
0002-sync-Fix-crash-with-malformed-document.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From ad84398cbdf5b66abde8c90b55df386482ece1ff Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangzhangxin <zhangxin1@xfusion.com>
|
||||||
|
Date: Fri, 7 Jul 2023 16:36:16 +0800
|
||||||
|
Subject: [PATCH] sync:Fix crash with malformed document
|
||||||
|
|
||||||
|
Signed-off-by: zhangzhangxin <zhangxin1@xfusion.com>
|
||||||
|
---
|
||||||
|
libspectre/ps.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libspectre/ps.c b/libspectre/ps.c
|
||||||
|
index fb84d80..62472b1 100644
|
||||||
|
--- a/libspectre/ps.c
|
||||||
|
+++ b/libspectre/ps.c
|
||||||
|
@@ -1065,7 +1065,7 @@ continuepage:
|
||||||
|
iscomment(line+2, "PageMedia:")) {
|
||||||
|
cp = ps_gettext(line+length("%%PageMedia:"), NULL);
|
||||||
|
for (dmp = doc->media, i=0; i<doc->nummedia; i++, dmp++) {
|
||||||
|
- if (strcmp(cp, dmp->name) == 0) {
|
||||||
|
+ if (cp && strcmp(cp, dmp->name) == 0) {
|
||||||
|
doc->pages[doc->numpages].media = dmp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.40.0.windows.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: libspectre
|
Name: libspectre
|
||||||
Version: 0.2.8
|
Version: 0.2.8
|
||||||
Release: 9
|
Release: 10
|
||||||
Summary: A small library for rendering Postscript documents
|
Summary: A small library for rendering Postscript documents
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: http://libspectre.freedesktop.org
|
URL: http://libspectre.freedesktop.org
|
||||||
@ -8,6 +8,7 @@ Source0: http://libspectre.freedesktop.org/releases/%{name}-%{version}.ta
|
|||||||
|
|
||||||
BuildRequires: libgs-devel
|
BuildRequires: libgs-devel
|
||||||
Patch0: 0001-sync-state-what-lib-is-printing-the-error.patch
|
Patch0: 0001-sync-state-what-lib-is-printing-the-error.patch
|
||||||
|
Patch1: 0002-sync-Fix-crash-with-malformed-document.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Libspectre is a small library for rendering Postscript documents.
|
Libspectre is a small library for rendering Postscript documents.
|
||||||
@ -50,6 +51,9 @@ developing applications that use libspectre.
|
|||||||
%{_libdir}/pkgconfig/libspectre.pc
|
%{_libdir}/pkgconfig/libspectre.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 10 2023 zhangxin <zhangxin1@xfusion.com> - 0.2.8-10
|
||||||
|
- Fix crash with malformed document
|
||||||
|
|
||||||
* Mon Jul 10 2023 zhangxin <zhangxin1@xfusion.com> - 0.2.8-9
|
* Mon Jul 10 2023 zhangxin <zhangxin1@xfusion.com> - 0.2.8-9
|
||||||
- state what lib is printing the error
|
- state what lib is printing the error
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user