summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2004-06-29 15:26:20 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2004-06-29 15:26:20 +0000
commitf2fd45ae52f56fe0c738dd0b95aecdf52b252962 (patch)
tree24fbe9e50e282ffeae5fecf07026a8c11b283eef
parent5f969cbc52a0778a3b30394bd77bdeff63159ffd (diff)
adjust license fix SIGSEGV when saving large documents
adjust license fix SIGSEGV when saving large documents
-rw-r--r--src/PSEditWidget.cxx6
-rw-r--r--src/flpsed.cxx12
2 files changed, 10 insertions, 8 deletions
diff --git a/src/PSEditWidget.cxx b/src/PSEditWidget.cxx
index d3c54ad..6f4fc54 100644
--- a/src/PSEditWidget.cxx
+++ b/src/PSEditWidget.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: PSEditWidget.cxx,v 1.9 2004/06/28 19:43:16 hofmann Exp $"
+// "$Id: PSEditWidget.cxx,v 1.10 2004/06/29 17:26:20 hofmann Exp $"
//
// PSEditWidget routines.
//
@@ -269,7 +269,9 @@ int PSEditWidget::save(const char* savefile) {
while (fgets(linebuf, 1024, fp) != NULL) {
if (strcmp(linebuf, "showpage\n") == 0) {
- to_ps(sfp, p);
+ if (p < max_pages) {
+ to_ps(sfp, p);
+ }
p++;
}
fprintf(sfp, "%s", linebuf);
diff --git a/src/flpsed.cxx b/src/flpsed.cxx
index 1344bce..6506185 100644
--- a/src/flpsed.cxx
+++ b/src/flpsed.cxx
@@ -1,21 +1,21 @@
//
-// "$Id: flpsed.cxx,v 1.10 2004/06/28 19:43:16 hofmann Exp $"
+// "$Id: flpsed.cxx,v 1.11 2004/06/29 17:26:20 hofmann Exp $"
//
// flpsed program.
//
// Copyright 2004 by Johannes Hofmann
//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Library General Public
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
-// This library is distributed in the hope that it will be useful,
+// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Library General Public License for more details.
+// General Public License for more details.
//
-// You should have received a copy of the GNU Library General Public
+// You should have received a copy of the GNU General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA.