public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in net-misc/rsync/files: rsync-3.0.1-xattr-alloc.diff
@ 2008-04-10  3:39 Mike Frysinger (vapier)
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger (vapier) @ 2008-04-10  3:39 UTC (permalink / raw
  To: gentoo-commits

vapier      08/04/10 03:39:15

  Added:                rsync-3.0.1-xattr-alloc.diff
  Log:
  Add fix from upstream for security issue in optional xattr patch #216887.
  (Portage version: 2.2_pre5)

Revision  Changes    Path
1.1                  net-misc/rsync/files/rsync-3.0.1-xattr-alloc.diff

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/rsync/files/rsync-3.0.1-xattr-alloc.diff?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/rsync/files/rsync-3.0.1-xattr-alloc.diff?rev=1.1&content-type=text/plain

Index: rsync-3.0.1-xattr-alloc.diff
===================================================================
fix from upstream

http://bugs.gentoo.org/216887

--- a/util.c
+++ b/util.c
@@ -1329,7 +1329,7 @@ void *_new_array(unsigned long num, unsigned int size, int use_calloc)
 	return use_calloc ? calloc(num, size) : malloc(num * size);
 }
 
-void *_realloc_array(void *ptr, unsigned int size, unsigned long num)
+void *_realloc_array(void *ptr, unsigned int size, size_t num)
 {
 	if (num >= MALLOC_MAX/size)
 		return NULL;
@@ -1550,7 +1550,10 @@ void *expand_item_list(item_list *lp, size_t item_size,
 			new_size += incr;
 		else
 			new_size *= 2;
-		new_ptr = realloc_array(lp->items, char, new_size * item_size);
+		if (new_size < lp->malloced)
+			overflow_exit("expand_item_list");
+		/* Using _realloc_array() lets us pass the size, not a type. */
+		new_ptr = _realloc_array(lp->items, item_size, new_size);
 		if (verbose >= 4) {
 			rprintf(FINFO, "[%s] expand %s to %.0f bytes, did%s move\n",
 				who_am_i(), desc, (double)new_size * item_size,



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in net-misc/rsync/files: rsync-3.0.1-xattr-alloc.diff
@ 2008-04-12 20:30 Mike Frysinger (vapier)
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger (vapier) @ 2008-04-12 20:30 UTC (permalink / raw
  To: gentoo-commits

vapier      08/04/12 20:30:54

  Modified:             rsync-3.0.1-xattr-alloc.diff
  Log:
  update the patch to fix build issues on some systems #216887
  (Portage version: 2.2_pre5)

Revision  Changes    Path
1.2                  net-misc/rsync/files/rsync-3.0.1-xattr-alloc.diff

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/rsync/files/rsync-3.0.1-xattr-alloc.diff?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/rsync/files/rsync-3.0.1-xattr-alloc.diff?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/rsync/files/rsync-3.0.1-xattr-alloc.diff?r1=1.1&r2=1.2

Index: rsync-3.0.1-xattr-alloc.diff
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-misc/rsync/files/rsync-3.0.1-xattr-alloc.diff,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- rsync-3.0.1-xattr-alloc.diff	10 Apr 2008 03:39:14 -0000	1.1
+++ rsync-3.0.1-xattr-alloc.diff	12 Apr 2008 20:30:53 -0000	1.2
@@ -25,3 +25,14 @@
  		if (verbose >= 4) {
  			rprintf(FINFO, "[%s] expand %s to %.0f bytes, did%s move\n",
  				who_am_i(), desc, (double)new_size * item_size,
+--- a/proto.h
++++ b/proto.h
+@@ -322,7 +322,7 @@
+ int cmp_time(time_t file1, time_t file2);
+ int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6);
+ void *_new_array(unsigned int size, unsigned long num);
+-void *_realloc_array(void *ptr, unsigned int size, unsigned long num);
++void *_realloc_array(void *ptr, unsigned int size, size_t num);
+ const char *find_filename_suffix(const char *fn, int fn_len, int *len_ptr);
+ uint32 fuzzy_distance(const char *s1, int len1, const char *s2, int len2);
+ struct bitbag *bitbag_create(int max_ndx);



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-12 20:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-12 20:30 [gentoo-commits] gentoo-x86 commit in net-misc/rsync/files: rsync-3.0.1-xattr-alloc.diff Mike Frysinger (vapier)
  -- strict thread matches above, loose matches on Subject: below --
2008-04-10  3:39 Mike Frysinger (vapier)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox