rpms/tetex-lgrind/devel lgrind-3.67-options.patch, NONE, 1.1 tetex-lgrind.spec, 1.11, 1.12
Michael Schwendt (mschwendt)
fedora-extras-commits at redhat.com
Tue Aug 23 12:39:17 UTC 2005
Author: mschwendt
Update of /cvs/extras/rpms/tetex-lgrind/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10589
Modified Files:
tetex-lgrind.spec
Added Files:
lgrind-3.67-options.patch
Log Message:
* Tue Aug 23 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 3.67-9
- Fix many segfaults in parsing of options (#166519).
lgrind-3.67-options.patch:
--- NEW FILE lgrind-3.67-options.patch ---
diff -Nur lgrind-orig/source/lgrind.c lgrind/source/lgrind.c
--- lgrind-orig/source/lgrind.c 2001-11-04 12:24:22.000000000 +0100
+++ lgrind/source/lgrind.c 2005-08-23 14:25:03.000000000 +0200
@@ -327,7 +327,7 @@
}
/* put output to non-standard place */
- if (!strcmp(argv[0], "-o")) {
+ if (!strcmp(argv[0], "-o") && argc>1) {
if (freopen(argv[1], "w", stdout) == NULL) {
perror(argv[1]);
return BADEXIT;
@@ -389,7 +389,7 @@
}
/* Use %|\texttt|% for all fonts */
- if (!strcmp(argv[0], "-t")) {
+ if (!strcmp(argv[0], "-t") && argc>1) {
sscanf(argv[1], "%d", &TabWidth);
argc--, argv++;
argc--, argv++;
@@ -398,10 +398,11 @@
/* specify the language */
if (!strncmp(argv[0], "-l", 2)) {
- if (strlen(argv[0])==2) {
+ if (strlen(argv[0])==2 && argc>1) {
strcpy(language, argv[1]);
argc--, argv++;
argc--, argv++;
+ continue;
} else {
strcpy(language, argv[0]+2);
argc--, argv++;
@@ -410,13 +411,13 @@
}
/* specify the language description file for permanent use */
- if (!strcmp(argv[0], "-d!")) {
+ if (!strcmp(argv[0], "-d!") && argc>1) {
writeDefsfileInExe(programname, argv[1]);
return OKEXIT;
}
/* specify the language description file */
- if (!strncmp(argv[0], "-d", 2)) { /* TODO strncmp? */
+ if (!strncmp(argv[0], "-d", 2) && argc>1) { /* TODO strncmp? */
strcpy(defsfile, argv[1]);
argc--, argv++;
argc--, argv++;
@@ -424,7 +425,7 @@
}
/* specify the file containing variable substitutions */
- if (!strcmp(argv[0], "-v")) {
+ if (!strcmp(argv[0], "-v") && argc>1) {
varsubstlist=parsevartab(argv[1]);
argc--, argv++;
argc--, argv++;
Index: tetex-lgrind.spec
===================================================================
RCS file: /cvs/extras/rpms/tetex-lgrind/devel/tetex-lgrind.spec,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- tetex-lgrind.spec 5 Aug 2005 17:28:18 -0000 1.11
+++ tetex-lgrind.spec 23 Aug 2005 12:39:15 -0000 1.12
@@ -6,7 +6,7 @@
Summary: Source-code pretty-printer for LaTeX
Name: tetex-lgrind
Version: 3.67
-Release: 8%{?dist}
+Release: 9%{?dist}
URL: http://www.ctan.org/tex-archive/help/Catalogue/entries/lgrind.html
License: BSD
Group: Applications/Publishing
@@ -15,6 +15,7 @@
# file contained in the tarballs have to be verified one by one.
Source0: ftp://ftp.dante.de/tex-archive/support/lgrind.tar.gz
Patch0: lgrind-3.67-parsevartab.patch
+Patch1: lgrind-3.67-options.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): tetex
Requires(postun): tetex
@@ -34,6 +35,7 @@
%prep
%setup -q -n lgrind
%patch0 -p1 -b .parsevartab
+%patch1 -p1 -b .options
%build
make %{?_smp_mflags} \
@@ -84,6 +86,9 @@
%{texmf}/doc/
%changelog
+* Tue Aug 23 2005 Michael Schwendt <mschwendt[AT]users.sf.net> - 3.67-9
+- Fix many segfaults in parsing of options (#166519).
+
* Thu Aug 4 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.67-8
- Install the dvi file where it can be found by texdoc.
- URL updated.
More information about the fedora-extras-commits
mailing list