ant (1.8.0-4) 0010-fix-bus-error-in-gij.patch

Summary

 src/main/org/apache/tools/ant/util/ResourceUtils.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

    
download this patch

Patch contents

From: Torsten Werner <twerner@debian.org>
Date: Thu, 11 Mar 2010 22:04:50 +0100
Subject: [PATCH] fix bus error in gij

Thanks to Petr Salinger for this patch! It fixes
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570886>.
---
 .../org/apache/tools/ant/util/ResourceUtils.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/main/org/apache/tools/ant/util/ResourceUtils.java b/src/main/org/apache/tools/ant/util/ResourceUtils.java
index 1b8cd46..bb1af77 100644
--- a/src/main/org/apache/tools/ant/util/ResourceUtils.java
+++ b/src/main/org/apache/tools/ant/util/ResourceUtils.java
@@ -466,7 +466,7 @@ public class ResourceUtils {
                 long count = srcChannel.size();
                 while (position < count) {
                     position +=
-                        srcChannel.transferTo(position, FileUtils.BUF_SIZE,
+                        srcChannel.transferTo(position, count - position,
                                               destChannel);
                 }
             } finally {
--