From patchwork Sat Aug 17 16:19:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ren=C3=A9_Scharfe?= X-Patchwork-Id: 11099167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 43F7A18EC for ; Sat, 17 Aug 2019 16:19:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31452286BF for ; Sat, 17 Aug 2019 16:19:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2134A28929; Sat, 17 Aug 2019 16:19:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6E50286BF for ; Sat, 17 Aug 2019 16:19:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726083AbfHQQTn (ORCPT ); Sat, 17 Aug 2019 12:19:43 -0400 Received: from mout.web.de ([212.227.15.14]:33445 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbfHQQTn (ORCPT ); Sat, 17 Aug 2019 12:19:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1566058777; bh=avTcxFPej3AsCKvwgIJis5GlYnO0Gjcd/JcGkQpYlaM=; h=X-UI-Sender-Class:To:Cc:From:Subject:Date; b=BV4piyFHLHiesUA9E5h5SOMjakgJq6xixhmygZrmlWMOmRCtOhZtS4Xu1KzkWlQT6 Q3rUbF8M2DKWmeKtLDQrUoMbVJ23msSmisRBu/de8cHZVQtHOQQh3RI6pbVsPjN2Gl qpqED+wK/cZFrwkYPsWMBVx5ATXGMtdeRhFRCzmU= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.178.23] ([79.203.24.71]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M2uXO-1iIU5X0ewQ-00siIo; Sat, 17 Aug 2019 18:19:37 +0200 To: Git Mailing List Cc: Junio C Hamano From: =?utf-8?q?Ren=C3=A9_Scharfe?= Subject: [PATCH 0/4] fix pax extended header length calculation Message-ID: Date: Sat, 17 Aug 2019 18:19:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Language: en-US X-Provags-ID: V03:K1:4vMk95dI/HB8kyn2PGgNLd4ygY1Y8M3cBRXVl/usj3nN6+QyaeN qchIq9LsaUEsNXwS3PjoxSEGKuTCZNAc5TWYZawR0clGWLBFbfnx8Ymy4u1KWMRXRKlHvcA rR63A/Wjb8D5Isntb8D3gx8CXvqFs32ExX9zLMEhXUoS3aftiAjNpUa+wVNZ6UfPjhpzW11 6F5S1MUU9bwXhZUkoF3Mg== X-UI-Out-Filterresults: notjunk:1;V03:K0:PfXoNaW/B1Q=:IEeTMVP1cge5TaPiY/gUXW +HFq/6FFfl4ZaKYIxvNzCSLldynBFKdV+Sb7bY5XUCZ9Gx7qpkXAk6xq2IQ8A1Qd/oXuLN4U3 +ejSKnTEhbDBIcC3oZnhNd1SNN3zShUDJ9J/QhUyklLAiz71FMPA66CyDi++hAsqUvneGKlLN d9kUnvmBRCjNzYX38J3pxe527bj+IR/sjk/2yHrzj6dGPzg7FmexrjmRvFhFqnetulvjtZzBq G7UWC+JNaTv7eP5yFQFKCMlbaPxLbvPgDAYQp3+jhuEkxHqgQFti/IBRBO3h0/6jZGk/bIfuC 9l5v+inTjqtWltkTF+xMg3L2PKT66xIHNPLQqESBZmMEr3pRbcijfyFPIYoFZjdafvnG89pl7 rWh+QXFNM15Do02tJcOKBA0uUwfrLVJYZZS4GVj3CH9a5gD7oIs9Clll5lK+DgASmQgpJK2YO Kb1ADNkRewh25vxTJZvhVmhV8BaCm+HzjDKpyHsgyTX4Jy3wPU1UWxtmZHVOpxk/oPMHJGud6 nAYoP0n4TBt9sCP5RDI4trV6bQkAfFIa4w8E5LG7i2TswWg0Nlc08WNGRfnFOVerHhVsEbPW+ C2gk9pJe3VScMLSVjZgQelR6nBfEwAczzkEPsOMDsqSxntxt2eck+tPqYhLn+ADAiq1Kbc9RQ EoKAI/268V3dWJX00YEpi7Hr5mLxtPojHNciNKvBlHNfIIZ4wqyAPXkgsCUu3qRsmYdAJoycB ZgKRpgM6lTBla+618985QDzsKtOP4JYivblUOsoaG5XEgM3yV3JrX7R9C0UpZFEjZe5KjpQUx 5t3Hz2WPaGVKC6PCB7Y7SmqC8AogL+V9AZrcAyL3Lu2CFaoww2m49sjfIkuq5CQ/uKaeoosuh 2a/YjaMNp69y0LpWKqyr4Gi5H7wSVvKs6GGMbP508mPTyOwkAyub1ZBNgqsOuwrX1g7SxBkBm 6DWKyafaoSLrdh7txpSWtkIl3HM5Z5NbRuZXihfQvuCQMzEb/xASSI92tBkH4vDf67M4PIpGM 7dypPqjP6HrcZak2aSFi3ziRKG/NsmCEwKqu1ptJbnNCQvt+76FtFD97xYsVzNk3HyWM6gTBT vg+hcHJD18W0vbbHYqby66j1Sqm30U8rAMMmon1VzOGFybr66IlDbaOibCLD6tanSyVYGd99o ZER5E= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The code for building pax extended headers has been miscalculating lengths slightly shorter than powers of 10 since I wrote it in 2006. That affects entries for paths with a length of 990, 991, 9989, 9990, 9991, 99988 etc. and link targets 4 characters shorter. Here's a series for fixing it. archive-tar: report wrong pax extended header length archive-tar: fix pax extended header length calculation archive-tar: use size_t in strbuf_append_ext_header() archive-tar: turn length miscalculation warning into BUG archive-tar.c | 14 ++++++++++---- t/t5004-archive-corner-cases.sh | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) --- 2.23.0