goo/GooString.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit ff03811db1ef833df4bab12fe3bf3a8c1534c174 Author: Carlos Garcia Campos <[email protected]> Date: Sat Sep 3 10:40:15 2011 +0200 xpdf303: More checks in GooString diff --git a/goo/GooString.cc b/goo/GooString.cc index 49239aa..d72a68f 100644 --- a/goo/GooString.cc +++ b/goo/GooString.cc @@ -344,6 +344,9 @@ GooString *GooString::appendfv(const char *fmt, va_list argList) { for (; *p0 >= '0' && *p0 <= '9'; ++p0) { width = 10 * width + (*p0 - '0'); } + if (width < 0) { + width = 0; + } if (*p0 == '.') { ++p0; prec = 0; @@ -736,7 +739,7 @@ GooString *GooString::insert(int i, const char *str, int lengthA) { GooString *GooString::del(int i, int n) { int j; - if (n > 0) { + if (i >= 0 && n > 0 && i + n > 0) { if (i + n > length) { n = length - i; } _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
