head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.54 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.52 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.50 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.48 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.46 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.44 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.42 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.40 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.38 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.36 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.3.0.34 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.32 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.30 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.28 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.26 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.24 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.22 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.20 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.18 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.16 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.14 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.12 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.10 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.8 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.6 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.4 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3; locks; strict; comment @# @; 1.3 date 2003.05.22.03.01.03; author markd; state dead; branches; next 1.2; 1.2 date 2003.05.05.12.28.27; author markd; state Exp; branches; next 1.1; 1.1 date 2003.04.10.13.13.25; author markd; state Exp; branches; next ; desc @@ 1.3 log @Update KDE to 3.1.2. Changes: kdegraphics: * kghostview: Better handling of half-broken Postscript and PDF files * kghostview: Fix the opening of files on the command line, which was not working if the paths contained non-alphanumeric characters or were absolute paths * kghostview: Work around -dMaxBitmap bug in gs version 6.5x * kghostview: Reset orientation and paper size selectors after opening a new document * kghostview: Security fix for #56808. The security patch which was present in version 3.1.1a caused problems for some users and has been corrected * kghostview: ghostscript version 8 is now supported @ text @$NetBSD: patch-ao,v 1.2 2003/05/05 12:28:27 markd Exp $ --- kghostview/kpswidget.cpp.orig Mon Sep 16 09:12:40 2002 +++ kghostview/kpswidget.cpp @@@@ -309,10 +309,11 @@@@ void KPSWidget::setGhostscriptArguments( } } -void KPSWidget::setFileName( const QString& fileName ) +void KPSWidget::setFileName( const QString& fileName, bool usePipe ) { - if( _fileName != fileName ) + if(( _fileName != fileName ) || (_usePipe != usePipe)) { + _usePipe = usePipe; _fileName = fileName; stopInterpreter(); _ghostscriptDirty = true; @@@@ -508,8 +509,12 @@@@ void KPSWidget::startInterpreter() for( ; it != _ghostscriptArguments.end(); ++it ) *_process << (*it); - if( _fileName.isEmpty() ) - *_process << "-"; + if( _usePipe ) + *_process << + // The following two lines are their to ensure that we are allowed to read _fileName + "-dDELAYSAFER" << "-sInputFile="+_fileName << "-c" << + "<< /PermitFileReading [ InputFile ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe" << + "-"; else *_process << _fileName << "-c" << "quit"; @@@@ -527,7 +532,7 @@@@ void KPSWidget::startInterpreter() // Finally fire up the interpreter. kdDebug(4500) << "KPSWidget: starting interpreter" << endl; if( _process->start( KProcess::NotifyOnExit, - _fileName.isEmpty() ? KProcess::All : KProcess::AllOutput ) ) + _usePipe ? KProcess::All : KProcess::AllOutput ) ) { _interpreterBusy = true; setCursor( waitCursor ); @@@@ -648,7 +653,7 @@@@ void KPSWidget::readSettings() if( !intConfig->platformFonts() ) arguments << "-dNOPLATFONTS"; - arguments << "-dNOPAUSE" << "-dQUIET" << "-dSAFER"; + arguments << "-dNOPAUSE" << "-dQUIET" << "-dSAFER" << "-dPARANOIDSAFER"; setGhostscriptArguments( arguments ); @ 1.2 log @Fix problem with kghostview only showing the first page of a multipage ps file. From KDE Bug ID 57563. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Add the patches from KDE Security Advisory 20030409-1: PS/PDF file handling vulnerability http://www.kde.org/info/security/advisory-20030409-1.txt Bump PKGREVISION. @ text @d19 1 a19 1 @@@@ -508,8 +509,11 @@@@ void KPSWidget::startInterpreter() d29 2 a30 1 + "<< /PermitFileReading [ InputFile ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe"; d34 1 a34 1 @@@@ -527,7 +531,7 @@@@ void KPSWidget::startInterpreter() d43 1 a43 1 @@@@ -648,7 +652,7 @@@@ void KPSWidget::readSettings() @