$NetBSD: patch-ac,v 1.3 2002/10/14 11:55:17 markd Exp $ Index: kgv_miniwidget.cpp =================================================================== RCS file: /home/kde/kdegraphics/kghostview/kgv_miniwidget.cpp,v retrieving revision 1.100.2.2 retrieving revision 1.100.2.3 diff -u -5 -d -p -u -r1.100.2.2 -r1.100.2.3 --- kghostview/kgv_miniwidget.cpp 2001/11/08 00:35:51 1.100.2.2 +++ kghostview/kgv_miniwidget.cpp 2002/09/27 02:39:53 1.100.2.3 @@ -527,11 +527,12 @@ bool KGVMiniWidget::psCopyDoc( const QSt here = ftell( from ); if( pages_written || pages_atend ) { free( comment ); continue; } - sscanf( comment + length("%%Pages:" ), "%s", text ); + sscanf( comment + length("%%Pages:" ), "%256s", text ); + text[256] = 0; if( strcmp( text, "(atend)" ) == 0 ) { fputs( comment, to ); pages_atend = true; } else {