Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/814226/?format=api
{ "id": 814226, "url": "http://patchwork.ozlabs.org/api/patches/814226/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1505473053-32520-7-git-send-email-jjhiblot@ti.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1505473053-32520-7-git-send-email-jjhiblot@ti.com>", "list_archive_url": null, "date": "2017-09-15T10:57:29", "name": "[U-Boot,v6,06/10] gzip: add a function to parse the header", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a50c742d7d1bd59bba136b07ff76fb3f6a9813e7", "submitter": { "id": 70508, "url": "http://patchwork.ozlabs.org/api/people/70508/?format=api", "name": "Jean-Jacques Hiblot", "email": "jjhiblot@ti.com" }, "delegate": { "id": 3651, "url": "http://patchwork.ozlabs.org/api/users/3651/?format=api", "username": "trini", "first_name": "Tom", "last_name": "Rini", "email": "trini@ti.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1505473053-32520-7-git-send-email-jjhiblot@ti.com/mbox/", "series": [ { "id": 3280, "url": "http://patchwork.ozlabs.org/api/series/3280/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=3280", "date": "2017-09-15T10:57:23", "name": "spl: dm: Make it possible for the SPL to pick its own DTB from a FIT", "version": 6, "mbox": "http://patchwork.ozlabs.org/series/3280/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/814226/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/814226/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ti.com header.i=@ti.com header.b=\"Dk5mO6hg\";\n\tdkim-atps=neutral" ], "Received": [ "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xtsvH0C7zz9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 21:03:06 +1000 (AEST)", "by lists.denx.de (Postfix, from userid 105)\n\tid BA2F3C21F88; Fri, 15 Sep 2017 11:00:19 +0000 (UTC)", "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id B03D9C21FA2;\n\tFri, 15 Sep 2017 10:58:17 +0000 (UTC)", "by lists.denx.de (Postfix, from userid 105)\n\tid B0597C21FE3; Fri, 15 Sep 2017 10:58:01 +0000 (UTC)", "from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17])\n\tby lists.denx.de (Postfix) with ESMTPS id 73F8CC21FB6\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 10:57:54 +0000 (UTC)", "from dlelxv90.itg.ti.com ([172.17.2.17])\n\tby fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v8FAvqDQ023378; \n\tFri, 15 Sep 2017 05:57:52 -0500", "from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30])\n\tby dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8FAvqCV026386; \n\tFri, 15 Sep 2017 05:57:52 -0500", "from DLEE110.ent.ti.com (157.170.170.21) by DLEE100.ent.ti.com\n\t(157.170.170.30) with Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34;\n\tFri, 15 Sep 2017 05:57:52 -0500", "from dlep33.itg.ti.com (157.170.170.75) by DLEE110.ent.ti.com\n\t(157.170.170.21) with Microsoft SMTP Server (version=TLS1_0,\n\tcipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend\n\tTransport; Fri, 15 Sep 2017 05:57:52 -0500", "from localhost (ileax41-snat.itg.ti.com [10.172.224.153])\n\tby dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v8FAvp44024378;\n\tFri, 15 Sep 2017 05:57:51 -0500" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com;\n\ts=ti-com-17Q1; t=1505473072;\n\tbh=9DtuyoWSIrnjau2qK7U+qqNxAbBbkfp/dpJVLfBbebM=;\n\th=From:To:CC:Subject:Date:In-Reply-To:References;\n\tb=Dk5mO6hg9WfT0PbamZ3uszB9/49Qtry7LqAtuzXHl4pDl+1FUPbFoG7qPTy6Y3XK1\n\tX/zKsaf8wT4CRVH068UIdox8ac1VyGnQjrFLFCFFxJzPFSfsC/PKH9YrXK9bQCmNpe\n\tUFmrlPSZhad4aOfOJKBWO8SH7tInEFnvgETSHQZ0=", "From": "Jean-Jacques Hiblot <jjhiblot@ti.com>", "To": "<trini@konsulko.com>, <lokeshvutla@ti.com>, <sjg@chromium.org>,\n\t<fcooper@ti.com>", "Date": "Fri, 15 Sep 2017 12:57:29 +0200", "Message-ID": "<1505473053-32520-7-git-send-email-jjhiblot@ti.com>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<1505473053-32520-1-git-send-email-jjhiblot@ti.com>", "References": "<1505473053-32520-1-git-send-email-jjhiblot@ti.com>", "MIME-Version": "1.0", "X-EXCLAIMER-MD-CONFIG": "e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180", "Cc": "u-boot@lists.denx.de", "Subject": "[U-Boot] [PATCH v6 06/10] gzip: add a function to parse the header", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.18", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>" }, "content": "Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>\nReviewed-by: Tom Rini <trini@konsulko.com>\nReviewed-by: Simon Glass <sjg@chromium.org>\n---\n include/common.h | 1 +\n lib/gunzip.c | 15 ++++++++++++---\n 2 files changed, 13 insertions(+), 3 deletions(-)", "diff": "diff --git a/include/common.h b/include/common.h\nindex aaed131..36c1ac8 100644\n--- a/include/common.h\n+++ b/include/common.h\n@@ -624,6 +624,7 @@ ulong\tusec2ticks (unsigned long usec);\n ulong\tticks2usec (unsigned long ticks);\n \n /* lib/gunzip.c */\n+int gzip_parse_header(const unsigned char *src, unsigned long len);\n int gunzip(void *, int, unsigned char *, unsigned long *);\n int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,\n \t\t\t\t\t\tint stoponerr, int offset);\ndiff --git a/lib/gunzip.c b/lib/gunzip.c\nindex 832b306..adb86c7 100644\n--- a/lib/gunzip.c\n+++ b/lib/gunzip.c\n@@ -42,7 +42,7 @@ void gzfree(void *x, void *addr, unsigned nb)\n \tfree (addr);\n }\n \n-int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp)\n+int gzip_parse_header(const unsigned char *src, unsigned long len)\n {\n \tint i, flags;\n \n@@ -63,12 +63,21 @@ int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp)\n \t\t\t;\n \tif ((flags & HEAD_CRC) != 0)\n \t\ti += 2;\n-\tif (i >= *lenp) {\n+\tif (i >= len) {\n \t\tputs (\"Error: gunzip out of data in header\\n\");\n \t\treturn (-1);\n \t}\n+\treturn i;\n+}\n+\n+int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp)\n+{\n+\tint offset = gzip_parse_header(src, *lenp);\n+\n+\tif (offset < 0)\n+\t\treturn offset;\n \n-\treturn zunzip(dst, dstlen, src, lenp, 1, i);\n+\treturn zunzip(dst, dstlen, src, lenp, 1, offset);\n }\n \n #ifdef CONFIG_CMD_UNZIP\n", "prefixes": [ "U-Boot", "v6", "06/10" ] }