poppler/Decrypt.cc | 2 +- poppler/Function.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit ec32bb45a57a8a839156c946fcde1270aa6019d9 Author: Albert Astals Cid <[email protected]> Date: Sat Oct 23 23:00:03 2010 +0100 Do not crash if n is 0 diff --git a/poppler/Function.cc b/poppler/Function.cc index e7383fd..409b679 100644 --- a/poppler/Function.cc +++ b/poppler/Function.cc @@ -995,6 +995,9 @@ void PSStack::roll(int n, int j) { PSObject obj; int i, k; + if (unlikely(n == 0)) { + return; + } if (j >= 0) { j %= n; } else { commit 9edf7e4fefb37989af9a2558aaa83d7cd4694ec6 Author: Albert Astals Cid <[email protected]> Date: Sat Oct 23 22:59:50 2010 +0100 add unlikely marker diff --git a/poppler/Decrypt.cc b/poppler/Decrypt.cc index bcba767..2373a66 100644 --- a/poppler/Decrypt.cc +++ b/poppler/Decrypt.cc @@ -353,7 +353,7 @@ static void rc4InitKey(Guchar *key, int keyLen, Guchar *state) { for (i = 0; i < 256; ++i) state[i] = i; - if (keyLen == 0) + if (unlikely(keyLen == 0)) return; index1 = index2 = 0; _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
