Commit 6a368a93 authored by Pino Toscano's avatar Pino Toscano

fix GooString::insert (#693817)

backport upstream commits 7ba15d11e56175601104d125d5e4a47619c224bf and 55940e989701eb9118015e30f4f48eb654fa34c4
parent 82b4a1bd
......@@ -5,6 +5,9 @@ poppler (0.12.4-1.2+squeeze1) UNRELEASED; urgency=low
* Fix CVE-2010-0207; patch adapted to be API-/ABI-compatible.
* Fix CVE-2010-4653; patch adapted to include object.h instead
of goo/GooLikely.h (non-existent in poppler 0.12.x).
* Backport upstream commits 7ba15d11e56175601104d125d5e4a47619c224bf and
55940e989701eb9118015e30f4f48eb654fa34c4 to fix GooString::insert;
patch upstream_fix-GooString-insert.diff. (Closes: #693817)
-- Pino Toscano <pino@debian.org> Wed, 27 Jun 2012 18:36:18 +0200
......
......@@ -5,3 +5,4 @@
05_CVE-2010-0206.patch
06_CVE-2010-0207.patch
07_CVE-2010-4653.patch
upstream_fix-GooString-insert.diff
Author: Pino Toscano <pino@kde.org>
Description: fix GooString::insert
Applied-Upstream: 0.21.3, commit:7ba15d11e56175601104d125d5e4a47619c224bf, commit:55940e989701eb9118015e30f4f48eb654fa34c4
Last-Update: 2012-11-27
Bug-Debian: http://bugs.debian.org/693817
--- a/goo/GooString.cc
+++ b/goo/GooString.cc
@@ -640,14 +640,12 @@ GooString *GooString::insert(int i, GooS
}
GooString *GooString::insert(int i, const char *str, int lengthA) {
- int j;
int prevLen = length;
if (CALC_STRING_LEN == lengthA)
lengthA = strlen(str);
resize(length + lengthA);
- for (j = prevLen; j >= i; --j)
- s[j+lengthA] = s[j];
+ memmove(s+i+lengthA, s+i, prevLen-i);
memcpy(s+i, str, lengthA);
return this;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment