OBS-URL: https://build.opensuse.org/package/show/Publishing/transfig?expand=0&rev=97
34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
From da8992f44b84a337b4edaa67fc8b36b55eaef696 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Loimer <thomas.loimer@tuwien.ac.at>
|
|
Date: Wed, 22 Jan 2025 23:18:54 +0100
|
|
Subject: [PATCH] Reject huge pattern lengths, ticket #185
|
|
|
|
Reject patterned lines, e.g., dashed lines, where the
|
|
pattern length exceeds 80 inches.
|
|
---
|
|
fig2dev/object.h | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git fig2dev/object.h fig2dev/object.h
|
|
index 29f5a62..7f83939 100644
|
|
--- fig2dev/object.h
|
|
+++ fig2dev/object.h
|
|
@@ -57,12 +57,13 @@ typedef struct f_comment {
|
|
struct f_comment *next;
|
|
} F_comment;
|
|
|
|
+#define STYLE_VAL_MAX 6400.0 /* dash length 80 inches, that is enough */
|
|
#define COMMON_PROPERTIES(o) \
|
|
o->style < SOLID_LINE || o->style > DASH_3_DOTS_LINE || \
|
|
o->thickness < 0 || o->depth < 0 || o->depth > 999 || \
|
|
o->fill_style < UNFILLED || \
|
|
o->fill_style >= NUMSHADES + NUMTINTS + NUMPATTERNS || \
|
|
- o->style_val < 0.0
|
|
+ o->style_val < 0.0 || o->style_val > STYLE_VAL_MAX
|
|
|
|
typedef struct f_ellipse {
|
|
int type;
|
|
--
|
|
2.35.3
|
|
|