Description: Correctly restore PS stack when PDF stream run aborts.
 Fix "File has unbalanced q/Q operators (too many Q's)" endless loop.
Origin: upstream, http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=3a56f4e
Author: Alex Cherepanov <alex.cherepanov@artifex.com>
Forwarded: yes
Bug: http://bugs.ghostscript.com/show_bug.cgi?id=693045
Bug-Debian: http://bugs.debian.org/714247
Last-Update: 2013-07-04

--- a/Resource/Init/pdf_draw.ps
+++ b/Resource/Init/pdf_draw.ps
@@ -1773,9 +1773,8 @@
   ] cvx /PaintProc exch put
     % Adjust pdfemptycount since we have an extra dictionary on the stack
   pdfemptycount countdictstack  3 -1 roll
-  /pdfemptycount count 2 sub store
-  q execform  			% gsave / grestore around the Form
-
+  /pdfemptycount count 3 sub store
+  /q cvx /execform cvx 5 -2 roll 4 .execn
   % Restore pdfemptycount
   0
   { countdictstack 
