{"id":803343,"url":"http://patchwork.ozlabs.org/api/patches/803343/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/patch/1503075317-32255-1-git-send-email-michael-dev@fami-braun.de/","project":{"id":22,"url":"http://patchwork.ozlabs.org/api/projects/22/?format=json","name":"HostAP Development","link_name":"hostap","list_id":"hostap.lists.infradead.org","list_email":"hostap@lists.infradead.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1503075317-32255-1-git-send-email-michael-dev@fami-braun.de>","list_archive_url":null,"date":"2017-08-18T16:55:17","name":"[1/1] crypto:fix undefined behaviour","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"7f7615b620968662d646d510f0377ba6c848c95a","submitter":{"id":3892,"url":"http://patchwork.ozlabs.org/api/people/3892/?format=json","name":"michael-dev","email":"michael-dev@fami-braun.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/hostap/patch/1503075317-32255-1-git-send-email-michael-dev@fami-braun.de/mbox/","series":[],"comments":"http://patchwork.ozlabs.org/api/patches/803343/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/803343/checks/","tags":{},"related":[],"headers":{"Return-Path":"<hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"eDAQdmgv\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xYq5n5pbwz9sNc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 19 Aug 2017 02:58:05 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dikaZ-0003eg-8q; Fri, 18 Aug 2017 16:57:39 +0000","from mail.fem.tu-ilmenau.de ([141.24.220.54])\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1dikaW-0003aT-53\n\tfor hostap@lists.infradead.org; Fri, 18 Aug 2017 16:57:38 +0000","from localhost (localhost [127.0.0.1])\n\tby mail.fem.tu-ilmenau.de (Postfix) with ESMTP id 0CDDA664D;\n\tFri, 18 Aug 2017 18:57:12 +0200 (CEST)","from mail.fem.tu-ilmenau.de ([127.0.0.1])\n\tby localhost (mail.fem.tu-ilmenau.de [127.0.0.1]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id kqqEPOLzMyxe; Fri, 18 Aug 2017 18:57:09 +0200 (CEST)","from mail-backup.fem.tu-ilmenau.de\n\t(mail-backup.net.fem.tu-ilmenau.de [10.42.40.22])\n\t(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.fem.tu-ilmenau.de (Postfix) with ESMTPS;\n\tFri, 18 Aug 2017 18:57:09 +0200 (CEST)","from a234.fem.tu-ilmenau.de (ray-controller.net.fem.tu-ilmenau.de\n\t[10.42.51.234])\n\tby mail-backup.fem.tu-ilmenau.de (Postfix) with ESMTP id 239C756054; \n\tFri, 18 Aug 2017 18:57:09 +0200 (CEST)","by a234.fem.tu-ilmenau.de (Postfix, from userid 1000)\n\tid 7C3A03085499; Fri, 18 Aug 2017 18:55:19 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe:\n\tList-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:\n\tSubject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:\n\tReferences:List-Owner; bh=SNTqph/TSne9QDdjloMMFoyLPNEhlTpnbnI8STn8b74=;\n\tb=eDA\n\tQdmgvbZ1bq9R+b/57gfRDF4cql4d5BOc9ch3B/ncEMah+GaMH7j8GAoRjJcfG2/P4wGoN/nWGTR2j\n\tNVpt5BSbBTVnTrw8ucjdtC1qDgkT0vnHGvsrqcbhDhIFM6PrHwmzKJ+rrEBKIJGcd2EEYSuLtrkk5\n\tZ0+TYBGyprwjTmvI2RSNJO+mOVGUhw5aFNwJDtEUmILltQc9J8idlc32ginr67NFN8aDE5hBAMwbk\n\tDF1xJBREN2PEuGk7vLBsO/bnpl+xQQuB8yKXN7I2HQnRPIqHcn90vRQQZhTXQ6hKZVQO4Ub5CMMNI\n\tNcQv4FUsGYtE1NBHw/schhrOzN5pulg==;","X-Virus-Scanned":"amavisd-new at fem.tu-ilmenau.de","From":"Michael Braun <michael-dev@fami-braun.de>","To":"hostap@lists.infradead.org","Subject":"[PATCH 1/1] crypto:fix undefined behaviour","Date":"Fri, 18 Aug 2017 18:55:17 +0200","Message-Id":"<1503075317-32255-1-git-send-email-michael-dev@fami-braun.de>","X-Mailer":"git-send-email 2.1.4","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170818_095736_353988_76486687 ","X-CRM114-Status":"UNSURE (   6.61  )","X-CRM114-Notice":"Please train this message.","X-Spam-Score":"-4.2 (----)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-4.2 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\n\tmedium trust [141.24.220.54 listed in list.dnswl.org]\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"hostap@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<hostap.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/hostap>,\n\t<mailto:hostap-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/hostap/>","List-Post":"<mailto:hostap@lists.infradead.org>","List-Help":"<mailto:hostap-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/hostap>,\n\t<mailto:hostap-request@lists.infradead.org?subject=subscribe>","Cc":"projekt-wlan@fem.tu-ilmenau.de, Michael Braun <michael-dev@fami-braun.de>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"\"Hostap\" <hostap-bounces@lists.infradead.org>","Errors-To":"hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"},"content":"ubsan reported:\n\n../src/crypto/random.c:69:30: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'\n\nSigned-off-by: Michael Braun <michael-dev@fami-braun.de>\n---\n src/crypto/random.c | 3 +++\n 1 file changed, 3 insertions(+)","diff":"diff --git a/src/crypto/random.c b/src/crypto/random.c\nindex 3a86a93..fb92417 100644\n--- a/src/crypto/random.c\n+++ b/src/crypto/random.c\n@@ -66,6 +66,9 @@ static void random_write_entropy(void);\n \n static u32 __ROL32(u32 x, u32 y)\n {\n+\tif (y == 0)\n+\t\treturn x;\n+\n \treturn (x << (y & 31)) | (x >> (32 - (y & 31)));\n }\n \n","prefixes":["1/1"]}