rpms/texinfo/devel texinfo-CAN-2005-3011.patch, 1.1, 1.2 texinfo.spec, 1.37, 1.38
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Oct 9 16:49:06 UTC 2006
- Previous message (by thread): rpms/hwdata/devel .cvsignore, 1.75, 1.76 hwdata.spec, 1.77, 1.78 sources, 1.78, 1.79
- Next message (by thread): rpms/initscripts/devel .cvsignore, 1.112, 1.113 initscripts.spec, 1.129, 1.130 sources, 1.124, 1.125
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mitr
Update of /cvs/dist/rpms/texinfo/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv8463
Modified Files:
texinfo-CAN-2005-3011.patch texinfo.spec
Log Message:
* Mon Oct 9 2006 Miloslav Trmac <mitr at redhat.com> - 4.8-12
- Don't leave around temporary files used by texindex
- Add missing error handling to texinfo-CAN-2005-3011.patch
texinfo-CAN-2005-3011.patch:
texindex.c | 67 ++++++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 45 insertions(+), 22 deletions(-)
Index: texinfo-CAN-2005-3011.patch
===================================================================
RCS file: /cvs/dist/rpms/texinfo/devel/texinfo-CAN-2005-3011.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- texinfo-CAN-2005-3011.patch 14 Oct 2005 08:59:02 -0000 1.1
+++ texinfo-CAN-2005-3011.patch 9 Oct 2006 16:49:04 -0000 1.2
@@ -1,5 +1,5 @@
---- texinfo-4.8/util/texindex.c.CAN-2005-3011 2004-04-11 18:56:47.000000000 +0100
-+++ texinfo-4.8/util/texindex.c 2005-10-13 19:06:33.000000000 +0100
+--- texinfo-4.8/util/texindex.c.CAN-2005-3011 2004-04-11 19:56:47.000000000 +0200
++++ texinfo-4.8/util/texindex.c 2006-10-09 18:35:52.000000000 +0200
@@ -99,6 +99,9 @@
/* Directory to use for temporary files. On Unix, it ends with a slash. */
char *tempdir;
@@ -49,24 +49,33 @@
keep_tempfiles = 0;
-@@ -384,26 +392,25 @@
+@@ -384,26 +392,33 @@
usage (1);
}
-/* Return a name for temporary file COUNT. */
-+/* Return a name for a temporary file. */
++/* Return a name for a temporary file. It is INSECURE to use this name to
++ create files without O_EXCL. */
++static char *
++gettempname (int count)
++{
++ char tempsuffix[10];
++ sprintf (tempsuffix, ".%d", count);
++ return concat (tempdir, tempbase, tempsuffix);
++}
++
++/* Return a name for a new temporary file. */
static char *
maketempname (int count)
{
- static char *tempbase = NULL;
- char tempsuffix[10];
+- char tempsuffix[10];
+ char *name;
+ int fd;
- if (!tempbase)
-+ sprintf (tempsuffix, ".%d", count);
-+ name = concat (tempdir, tempbase, tempsuffix);
++ name = gettempname (count);
+ fd = open (name, O_CREAT|O_EXCL|O_WRONLY, 0666);
+ if (fd == -1)
+ return NULL;
@@ -87,7 +96,30 @@
}
-@@ -931,6 +938,8 @@
+@@ -415,7 +430,7 @@
+ if (keep_tempfiles)
+ return;
+ while (last_deleted_tempcount < to_count)
+- unlink (maketempname (++last_deleted_tempcount));
++ unlink (gettempname (++last_deleted_tempcount));
+ }
+
+
+@@ -883,9 +898,12 @@
+ for (i = 0; i < ntemps; i++)
+ {
+ char *outname = maketempname (++tempcount);
+- FILE *ostream = fopen (outname, "w");
++ FILE *ostream;
+ long tempsize = 0;
+
++ if (!outname)
++ pfatal_with_name("temp file");
++ ostream = fopen (outname, "w");
+ if (!ostream)
+ pfatal_with_name (outname);
+ tempfiles[i] = outname;
+@@ -931,6 +949,8 @@
for (i = 0; i < ntemps; i++)
{
char *newtemp = maketempname (++tempcount);
@@ -96,7 +128,7 @@
sort_in_core (tempfiles[i], MAX_IN_CORE_SORT, newtemp);
if (!keep_tempfiles)
unlink (tempfiles[i]);
-@@ -1401,6 +1410,8 @@
+@@ -1401,6 +1421,8 @@
if (i + 1 == ntemps)
nf = nfiles - i * MAX_DIRECT_MERGE;
tempfiles[i] = maketempname (++tempcount);
@@ -105,7 +137,7 @@
value |= merge_direct (&infiles[i * MAX_DIRECT_MERGE], nf, tempfiles[i]);
}
-@@ -1615,14 +1626,15 @@
+@@ -1615,14 +1637,15 @@
/* Return a newly-allocated string concatenating S1 and S2. */
char *
Index: texinfo.spec
===================================================================
RCS file: /cvs/dist/rpms/texinfo/devel/texinfo.spec,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- texinfo.spec 12 Jul 2006 08:28:07 -0000 1.37
+++ texinfo.spec 9 Oct 2006 16:49:04 -0000 1.38
@@ -1,7 +1,7 @@
Summary: Tools needed to create Texinfo format documentation files.
Name: texinfo
Version: 4.8
-Release: 11.1
+Release: 12
License: GPL
Group: Applications/Publishing
Url: http://www.gnu.org/software/texinfo/
@@ -137,6 +137,10 @@
%{_mandir}/man1/texi2pdf.1*
%changelog
+* Mon Oct 9 2006 Miloslav Trmac <mitr at redhat.com> - 4.8-12
+- Don't leave around temporary files used by texindex
+- Add missing error handling to texinfo-CAN-2005-3011.patch
+
* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 4.8-11.1
- rebuild
- Previous message (by thread): rpms/hwdata/devel .cvsignore, 1.75, 1.76 hwdata.spec, 1.77, 1.78 sources, 1.78, 1.79
- Next message (by thread): rpms/initscripts/devel .cvsignore, 1.112, 1.113 initscripts.spec, 1.129, 1.130 sources, 1.124, 1.125
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list