rpms/tar/F-12 tar-1.22-nsfraction.patch,1.1,1.2
Ondrej Vasik
ovasik at fedoraproject.org
Thu Feb 4 12:09:44 UTC 2010
- Previous message: rpms/audacious-plugins/devel audacious-plugins-2.2-ladspa-restore.patch, NONE, 1.1 audacious-plugins.spec, 1.89, 1.90
- Next message: rpms/audacious-plugins/F-12 audacious-plugins-2.2-ladspa.patch, NONE, 1.1 audacious-plugins.spec, 1.87, 1.88 audacious-plugins-2.2-ladspa-restore.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ovasik
Update of /cvs/pkgs/rpms/tar/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8183
Modified Files:
tar-1.22-nsfraction.patch
Log Message:
fix the fix for ns_fraction to prevent stack smashing in next tar update ;)
tar-1.22-nsfraction.patch:
misc.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
Index: tar-1.22-nsfraction.patch
===================================================================
RCS file: /cvs/pkgs/rpms/tar/F-12/tar-1.22-nsfraction.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- tar-1.22-nsfraction.patch 8 Dec 2009 13:46:17 -0000 1.1
+++ tar-1.22-nsfraction.patch 4 Feb 2010 12:09:44 -0000 1.2
@@ -1,12 +1,25 @@
diff -urNp tar-1.22-orig/src/misc.c tar-1.22/src/misc.c
--- tar-1.22-orig/src/misc.c 2007-06-27 15:30:32.000000000 +0200
-+++ tar-1.22/src/misc.c 2009-12-08 13:41:46.000000000 +0100
-@@ -228,7 +228,7 @@ code_ns_fraction (int ns, char *p)
- *p = '\0';
- else
- {
-- int i = 9;
-+ int i = 10;
- *p++ = '.';
++++ tar-1.22/src/misc.c 2010-02-04 12:05:00.000000000 +0100
+@@ -255,7 +255,20 @@ code_timespec (struct timespec t, char s
+ time_t s = t.tv_sec;
+ int ns = t.tv_nsec;
+ char *np;
+- bool negative = s < 0;
++ bool negative;
++
++ /* ignore any negative ns value */
++ if (ns < 0)
++ ns = 0;
++
++ /* ensure (ns < BILLION) to avoid SIGSEGV within code_ns_fraction () */
++ if (BILLION <= ns )
++ {
++ s += ns / BILLION;
++ ns %= BILLION;
++ }
++
++ negative = s < 0;
- while (ns % 10 == 0)
+ if (negative && ns != 0)
+ {
- Previous message: rpms/audacious-plugins/devel audacious-plugins-2.2-ladspa-restore.patch, NONE, 1.1 audacious-plugins.spec, 1.89, 1.90
- Next message: rpms/audacious-plugins/F-12 audacious-plugins-2.2-ladspa.patch, NONE, 1.1 audacious-plugins.spec, 1.87, 1.88 audacious-plugins-2.2-ladspa-restore.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list