[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
-S option segfaults
From: |
Franck Lombardi |
Subject: |
-S option segfaults |
Date: |
Tue, 3 Sep 2002 18:17:07 +0200 |
User-agent: |
KMail/1.4.2 |
Fix the bug 143127 in Debian bug tracking system :
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=143127
PS : Akim, is it the good patch format to this ML ??
To make it, I used "cvs diff -u ChangeLog lib/psstat.c", but the
ChangeLog
diff is not as your.
In your patches, you do not have lines "======", "RCS file .....", etc
in
ChangeLog entry.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/a2ps/a2ps/ChangeLog,v
retrieving revision 1.4.2.11
diff -u -r1.4.2.11 ChangeLog
--- ChangeLog 3 Sep 2002 14:06:29 -0000 1.4.2.11
+++ ChangeLog 3 Sep 2002 16:16:53 -0000
@@ -1,3 +1,8 @@
+2002-09-03 Franck Lombardi <address@hidden>
+
+ * lib/psstat.c: Fixed a segfaults when the -S option is used
+ Reported by Daniel Jonsson.
+
2002-09-03 Akim Demaille <address@hidden>
* mbrtowc.m4, mbstate_t.m4, prereq.m4: New.
Index: lib/psstat.c
===================================================================
RCS file: /cvsroot/a2ps/a2ps/lib/Attic/psstat.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 psstat.c
--- lib/psstat.c 4 Mar 2002 18:46:25 -0000 1.1.1.1
+++ lib/psstat.c 3 Sep 2002 16:16:53 -0000
@@ -83,8 +83,8 @@
const char * key, const char * value, int def)
{
NEW (dict_entry, item);
- item->key = xstrdup (key);
- item->value = xstrdup (value);
+ item->key = key ? xstrdup (key) : NULL;
+ item->value = value ? xstrdup (value) : NULL;
item->def = def;
hash_insert (table, item);
}
@@ -266,7 +266,8 @@
/* Each Pagedevice */
for (entry = entries ; *entry ; entry++)
- output (job->divertion, "\
+ if ((*entry)->value)
+ output (job->divertion, "\
%%%%BeginFeature: *%s %c%s\n\
(<<) cvx exec /%s (%s) cvx exec (>>) cvx exec setpagedevice\n\
%%%%EndFeature\n",
- -S option segfaults,
Franck Lombardi <=