rpms/dev86/devel dev86-long.patch, NONE, 1.1 dev86-overflow.patch, NONE, 1.1 dev86.spec, 1.29, 1.30

Jindrich Novy jnovy at fedoraproject.org
Thu Feb 19 10:51:04 UTC 2009


Author: jnovy

Update of /cvs/pkgs/rpms/dev86/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14491

Modified Files:
	dev86.spec 
Added Files:
	dev86-long.patch dev86-overflow.patch 
Log Message:
* Thu Feb 19 2009 Jindrich Novy <jnovy at redhat.com> 0.16.17-13
- fix buffer overflow caused by realpath() call
- attempt to fix type width size for 64bit arches
- merge review fixes (#225683):
  - remove BR: gawk
  - add licenses to documentation
  - use RPM_OPT_FLAGS to compile arch dependent binaries


dev86-long.patch:

--- NEW FILE dev86-long.patch ---
diff -up dev86-0.16.17/ld/x86_aout.h.long dev86-0.16.17/ld/x86_aout.h
--- dev86-0.16.17/ld/x86_aout.h.long	2003-01-28 23:17:14.000000000 +0100
+++ dev86-0.16.17/ld/x86_aout.h	2009-02-19 11:37:10.000000000 +0100
@@ -11,10 +11,11 @@
 /* If the host isn't an x86 all bets are off, use chars. */
 #if defined(i386) || defined(__BCC__) || defined(MSDOS)
 typedef long Long;
-#define __OUT_OK 1
 #else
-typedef char Long[4];
+#include <stdint.h>
+typedef int32_t Long;
 #endif
+#define __OUT_OK 1
 
 struct	exec {			/* a.out header */
   unsigned char	a_magic[2];	/* magic number */

dev86-overflow.patch:

--- NEW FILE dev86-overflow.patch ---
diff -up dev86-0.16.17/bcc/bcc.c.overflow dev86-0.16.17/bcc/bcc.c
--- dev86-0.16.17/bcc/bcc.c.overflow	2005-01-03 23:41:55.000000000 +0100
+++ dev86-0.16.17/bcc/bcc.c	2009-02-19 10:49:32.000000000 +0100
@@ -16,6 +16,7 @@
  *	-M0	A framework for the -B option.
  */
 #include <stdio.h>
+#include <limits.h>
 #ifdef __STDC__
 #include <stdlib.h>
 #ifndef MSDOS
@@ -1308,11 +1309,7 @@ void reset_prefix_path()
 
       for(d=s=ptr; d && *s; s=d)
       {
-#ifdef MAXPATHLEN
-         char buf[MAXPATHLEN];
-#else
-         char buf[1024];
-#endif
+         char buf[PATH_MAX];
 
 	 free(temp);
          d=strchr(s, ':');


Index: dev86.spec
===================================================================
RCS file: /cvs/pkgs/rpms/dev86/devel/dev86.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- dev86.spec	17 Feb 2009 11:37:32 -0000	1.29
+++ dev86.spec	19 Feb 2009 10:50:34 -0000	1.30
@@ -1,7 +1,7 @@
 Summary: A real mode 80x86 assembler and linker
 Name: dev86
 Version: 0.16.17
-Release: 12%{?dist}
+Release: 13%{?dist}
 License: GPL+ and GPLv2+ and LGPLv2+
 Group: Development/Languages
 URL: http://homepage.ntlworld.com/robert.debath/
@@ -9,10 +9,12 @@
 Patch0: dev86-noelks.patch
 Patch1: dev86-64bit.patch
 Patch2: dev86-nostrip.patch
+Patch3: dev86-overflow.patch
+Patch4: dev86-long.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes: bin86
-BuildRequires: gawk
 
+# don't try to strip binaries generated by dev86 unknown to /usr/bin/strip
 %define __os_install_post    /usr/lib/rpm/redhat/brp-compress /usr/lib/rpm/redhat/brp-strip %{__strip} /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} %{nil}
 
 %description
@@ -31,12 +33,17 @@
 %patch1 -p1 -b .64bit
 %endif
 %patch2 -p1 -b .nostrip
+%patch3 -p1 -b .overflow
+%patch4 -p1 -b .long
 
 %build
-make <<EOF
-5
-quit
-EOF
+# the main makefile doesn't allow parallel build
+make bcc86 unproto copt as86 ld86 CFLAGS="$RPM_OPT_FLAGS"
+make -C cpp CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
+make -C ar CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
+make -C ld CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
+# ncc doesn't support gcc optflags
+make
 
 %install
 rm -rf ${RPM_BUILD_ROOT}
@@ -52,6 +59,7 @@
 for i in bootblocks copt dis88 unproto bin86 ; do cp $i/README README.$i ; done
 cp bin86/README-0.4 README-0.4.bin86
 cp bin86/ChangeLog ChangeLog.bin86
+mv libc/COPYING COPYING.LGPL
 
 pushd ${RPM_BUILD_ROOT}%{_bindir}
 rm -f nm86 size86
@@ -65,7 +73,8 @@
 %files
 %defattr(-,root,root,-)
 %doc README MAGIC Contributors README.bootblocks README.copt README.dis88
-%doc README.unproto README-0.4.bin86 README.bin86 ChangeLog.bin86
+%doc README.unproto README-0.4.bin86 README.bin86 ChangeLog.bin86 COPYING
+%doc COPYING.LGPL
 %dir %{_libdir}/bcc
 %{_bindir}/bcc
 %{_bindir}/ar86
@@ -78,6 +87,14 @@
 %{_mandir}/man1/*
 
 %changelog
+* Thu Feb 19 2009 Jindrich Novy <jnovy at redhat.com> 0.16.17-13
+- fix buffer overflow caused by realpath() call
+- attempt to fix type width size for 64bit arches
+- merge review fixes (#225683):
+  - remove BR: gawk
+  - add licenses to documentation
+  - use RPM_OPT_FLAGS to compile arch dependent binaries
+
 * Tue Feb 17 2009 Jindrich Novy <jnovy at redhat.com> 0.16.17-12
 - apply 64bit fix to all platforms, not only on x86_64,
   thanks to Glauber Costa




More information about the fedora-extras-commits mailing list