Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3970347yba; Sun, 12 May 2019 01:59:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlbxSHHMZiyeL30G1OOKnK7J2qe17Oixo/vSKt7OlF98AyviaeGTzB5ul3ygz/iI4cS58V X-Received: by 2002:a62:75d8:: with SMTP id q207mr26127169pfc.35.1557651596620; Sun, 12 May 2019 01:59:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557651596; cv=none; d=google.com; s=arc-20160816; b=UUB+/gz+/oe0GwA99BsbIm+gC1nVQXw9B+eypqv1p/lnhNO2cta8+38bzy+OyNnjm6 2BJKhcHU75qSeByTpjo5wCpZmK5/JZVNWpU6otKKzM+LvwWp9BI7Ev/MZJnSchwcFlw/ 5wr/hyfss9NJ3WtZCkCEnSLeee1e5VnfSTAdR4ZRRJEPLEY6vEiVKUwU7Rqr3gqifCAv BvwtC9S5vevxbAJX29l4hvdRRVEdPnsbmEmcqGPYgwJWRMLCcs8oJJq4BW8luj1la9Ui AyyM5mZDLaKUjUlSI/aghd4XWQB2Ct/1dKkvOPJbMRjQOGWj4tcTI5zJAmzQvVB+btVJ mbXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=d5Git3lsWm1APonM+NiVQvy1vPWHMDQgVntO8YEpN4A=; b=EyyKg4m4nDjrJgknnYs5N7CnaZ+ykCIJGca2ZfcobSOCrM6Ar2bX/gIowK7CnAnqFE RL13afKWHk9OtQd+RaFTUwF9P2xr3sqXQcz8BdKsYd+ajBphFQ+EQQ81ZtcS51+4odEv eu3cjpeiCAt0eeR9gb3CofQxVQWbqnQAJau0+rDMi8Zv4c5RqTKptoY4a7oM2h6fjCyo jTwGU9/lw+fxx0YtfKhnRfcx8jCPGkHQ64xXlUCN0qX7evYQHtEh5qROBjwHkq1dlUoa ZuLf5tsBv4CGHepAgwghlDZkIk+hNuYvfNneMvsAb5WNEOOHhMofdAE8YsWxdLo4oAKa AjLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k15si14170869pfi.61.2019.05.12.01.59.25; Sun, 12 May 2019 01:59:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726430AbfELI6E (ORCPT + 99 others); Sun, 12 May 2019 04:58:04 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:49055 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725934AbfELI6E (ORCPT ); Sun, 12 May 2019 04:58:04 -0400 Received: from callcc.thunk.org ([91.207.175.60]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x4C8vv7A014751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 12 May 2019 04:58:00 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 683D9420024; Sun, 12 May 2019 04:57:56 -0400 (EDT) From: "Theodore Ts'o" To: Ext4 Developers List Cc: "Theodore Ts'o" , Gabriel Krisman Bertazi Subject: [PATCH] unicode: add missing check for an error return from utf8lookup() Date: Sun, 12 May 2019 04:57:52 -0400 Message-Id: <20190512085752.1791-1-tytso@mit.edu> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Signed-off-by: Theodore Ts'o Cc: Gabriel Krisman Bertazi --- fs/unicode/utf8-norm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/unicode/utf8-norm.c b/fs/unicode/utf8-norm.c index 20d440c3f2db..801ed6d2ea37 100644 --- a/fs/unicode/utf8-norm.c +++ b/fs/unicode/utf8-norm.c @@ -714,6 +714,8 @@ int utf8byte(struct utf8cursor *u8c) } leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s); + if (!leaf) + return -1; ccc = LEAF_CCC(leaf); } -- 2.19.1