From 2f8d1ae9763dcdc99b88a2b14849fe37174bcd69 Mon Sep 17 00:00:00 2001 From: Thomas Loimer Date: Wed, 29 Jan 2020 22:53:32 +0100 Subject: [PATCH] Reject out-of-range pattern, ticket #63 --- fig2dev/object.h | 2 +- fig2dev/tests/read.at | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git fig2dev/object.h fig2dev/object.h index 8464010..6830b13 100644 --- fig2dev/object.h +++ fig2dev/object.h @@ -61,7 +61,7 @@ typedef struct f_comment { 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->fill_style >= NUMSHADES + NUMTINTS + NUMPATTERNS || \ o->style_val < 0.0 typedef struct f_ellipse { |diff --git fig2dev/tests/read.at fig2dev/tests/read.at |index 2d066e4..bf117ee 100644 |--- fig2dev/tests/read.at |+++ fig2dev/tests/read.at |@@ -421,15 +421,30 @@ AT_CLEANUP | | AT_SETUP([reject ASCII NUL ('\0') in input, ticket #80]) | AT_KEYWORDS([read.c svg]) |-AT_CHECK([fig2dev -L svg $srcdir/data/text_w_ascii0.fig], 1, ignore, ignore) |+AT_CHECK([fig2dev -L svg $srcdir/data/text_w_ascii0.fig], |+1, ignore, [ASCII NUL ('\0') in line 11. |+]) | AT_CLEANUP | | AT_SETUP([reject out of range text angle, ticket #76]) |+AT_KEYWORDS([read.c pstricks]) | AT_CHECK([fig2dev -L pstricks <