Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7FEF4D2B5 for ; Sun, 26 Aug 2012 13:29:03 +0000 (UTC) Received: (qmail 4677 invoked by uid 500); 26 Aug 2012 13:29:02 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 4663 invoked by uid 500); 26 Aug 2012 13:29:02 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 4652 invoked by uid 99); 26 Aug 2012 13:29:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Aug 2012 13:29:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of razorinc@gmail.com designates 209.85.220.173 as permitted sender) Received: from [209.85.220.173] (HELO mail-vc0-f173.google.com) (209.85.220.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Aug 2012 13:28:55 +0000 Received: by vcbgb23 with SMTP id gb23so4607016vcb.32 for ; Sun, 26 Aug 2012 06:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=HoWyJTi0040JnlA5eIgQ3N05wYZj4CaIc8hQ0oRFjoo=; b=ecGd31knmDzNJK3NTzjn2EP0CySaHmFfQeafW94hvVRED8Px5nvlF/9EjutFls1FQ+ +yrG2+bp6hhUnu4UT0vv2pHMCI84A1h9jZnbnWw0jtq7okw6TrlUQua7W3IEDIyCvb5q rrbzM1GysHcqW8mMC9jEGj+mbrBNkVNfaJPgpGLt8e5h8d+iM7AKBi0BDhE60CwEeQgG cnDN74EsKy6uc7mMhY+KV92/bMtsTUKM+M8KxTBxkzIKaS97Ae359r+PWCJaYg9aP3P1 f0bUqlz4y7SksnCMDEbH2DzjVEnZ4nhDxuC03OsdW17klfGXYzTfNeSmpWHGYCmNzLj5 gNuQ== MIME-Version: 1.0 Received: by 10.52.174.82 with SMTP id bq18mr7799736vdc.25.1345987714211; Sun, 26 Aug 2012 06:28:34 -0700 (PDT) Received: by 10.58.235.132 with HTTP; Sun, 26 Aug 2012 06:28:34 -0700 (PDT) In-Reply-To: References: Date: Sun, 26 Aug 2012 15:28:34 +0200 Message-ID: Subject: Re: libdeltacloud bug fix and enhancement requests From: Francesco Vollero To: dev@deltacloud.apache.org Content-Type: text/plain; charset=ISO-8859-1 Hi Chris, On Sun, Aug 26, 2012 at 3:01 PM, Chris Lalancette wrote: > On Sun, Aug 26, 2012 at 4:34 AM, Francesco Vollero wrote: >> Hi Todd, >> >> On Sun, Aug 26, 2012 at 6:17 AM, Todd Loeber wrote: >>> Bug) In file curl_action.c, do_get_post_url uses strdup to copy >>> chunk.data, truncating binary blob content during download. >>> >>> I confirmed that returning chunk.data and header_chunk.data (instead >>> of strduping and freeing them) allows retrieval of binary data and >>> incidentally avoids an unnecessary copy. The caller is already >>> responsible for freeing the output parameters. >>> >>> If libdeltacloud is still alive, it would be nice to have >>> do_get_post_url fixed so binary blobs can be downloaded. And also, >>> some enhancements! >>> >> >> the libdeltacloud project is not currently maintained, but we would be >> more than pleased to see that libdeltacloud keep gaining some >> interest, with some new "fresh" patch, so why not help us to keep this >> project alive? :) :) :) > > That's actually not strictly true. I do still maintain it, though I > am not actively working on it. Any patches to improve it would > definitely be welcome. > Let me be more clear, the project libdeltacloud afaik is not supported by the core team of deltacloud. > As far as this particular issue is concerned, yeah, I see the problem > with using strdup. However, I don't think we can just remove the > strdup(). I'm pretty sure I wrote it that way for a reason, though I > honestly don't remember the reason. My suggestion would be to change > the strdup to a memcpy, which should fix this particular problem. If > you really want to remove the strdup, you would have to go through all > of the callers of do_get_post_url and make sure that none of them > require the duplicated data. > > Anyway, thanks for looking into it! > > Chris