summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poppler/PageLabelInfo_p.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/poppler/PageLabelInfo_p.h b/poppler/PageLabelInfo_p.h
index d3cd89f9..6cd5220d 100644
--- a/poppler/PageLabelInfo_p.h
+++ b/poppler/PageLabelInfo_p.h
@@ -3,7 +3,7 @@
// This file is under the GPLv2 or later license
//
// Copyright (C) 2005-2006 Kristian Høgsberg <krh@redhat.com>
-// Copyright (C) 2005, 2009 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2005, 2009, 2014 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2011 Simon Kellner <kellner@kit.edu>
// Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
//
@@ -15,6 +15,7 @@
/* http://mathworld.wolfram.com/RomanNumerals.html */
#include "goo/GooString.h"
+#include "Error.h"
static int fromRoman(const char *buffer) {
int digit_value, prev_digit_value, value;
@@ -73,6 +74,11 @@ static void toRoman(int number, GooString *str, GBool uppercase) {
int i, j, k;
const char *wh;
+ if (number >= 4000) {
+ error(errUnimplemented, -1, "Conversion to roman numberals of numbers >= 4000 not implemented");
+ return;
+ }
+
if (uppercase)
wh = uppercaseNumerals;
else