ooo-build r11440 - trunk/patches/src680
- From: tml svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11440 - trunk/patches/src680
- Date: Tue, 29 Jan 2008 13:04:14 +0000 (GMT)
Author: tml
Date: Tue Jan 29 13:04:14 2008
New Revision: 11440
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11440&view=rev
Log:
2008-01-29 Tor Lillqvist <tml novell com>
* patches/src680/dmake-heap-corruption.diff: New diff. Fixes i#85381.
* patches/src680/apply: Add it to Fixes.
Added:
trunk/patches/src680/dmake-heap-corruption.diff
Modified:
trunk/patches/src680/apply
Modified: trunk/patches/src680/apply
==============================================================================
--- trunk/patches/src680/apply (original)
+++ trunk/patches/src680/apply Tue Jan 29 13:04:14 2008
@@ -2105,3 +2105,4 @@
[ Fixes ]
sc-xclimpchangetrack-discard-bogus-formula-size.diff, n#355304, tml
+dmake-heap-corruption.diff, i#85381, tml
Added: trunk/patches/src680/dmake-heap-corruption.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/dmake-heap-corruption.diff Tue Jan 29 13:04:14 2008
@@ -0,0 +1,41 @@
+diff -u ../../ooh680-m2/dmake/make.c dmake/make.c
+--- ../../ooh680-m2/dmake/make.c 2007-10-15 18:40:19.000000000 +0300
++++ dmake/make.c 2008-01-18 23:49:18.943250000 +0200
+@@ -150,11 +150,11 @@
+ {
+ LISTCELLPTR next, cell;
+ int len;
+- int slen, slen_rest;
++ int slen;
+ char *result;
+ char *p, *tpath;
+
+- if( (slen_rest = slen = s->len) == 0)
++ if( (slen = s->len) == 0)
+ return(NIL(char));
+
+ /* reserve enough space to hold the concated original filenames. */
+@@ -175,20 +175,17 @@
+ /* ... but only if DO_WINPATH() did something. */
+ len = strlen(tpath);
+
+- if( len > slen_rest ) {
++ if( len > cell->len ) {
+ /* We need more memory. As DOS paths are usually shorter than the
+ * original cygwin POSIX paths (exception mounted paths) this should
+ * rarely happen. */
+ int p_offset = p - result;
+- /* Get more than needed. */
+- slen += slen + len-slen_rest + 128;
+- if((result = realloc( result, (unsigned)(slen*sizeof(char)) ) ) == NULL)
++ slen += (len-cell->len) + 1;
++ if((result = realloc( result, slen ) ) == NULL)
+ No_ram();
+ p = result + p_offset;
+ }
+ }
+-
+- slen_rest -= len;
+ #endif
+
+ memcpy((void *)p, (void *)tpath, len);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]