From nobody Tue Dec 2 01:51:42 2025 Received: from out-187.mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D354936E547 for ; Thu, 20 Nov 2025 21:48:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763675286; cv=none; b=MAdPE+M7v3TGmvFuCinJRybYlASMIX/GKDdFEDYncIPacXjuJXz1jQkkpfJjDrrA1GorlP+LsJnTJ/s0fNJnG5WHJCyGyJoGETqxvFiUmoXNFKtPJe8ecsZJcy07fjuwYp2A+wr+pfP1+N6g4YMTZ49AwCk9r7YorgqpAHSsq5o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763675286; c=relaxed/simple; bh=ZpLvQ1lINqo+k94kKlQDd7Y3RyCcBxaSd/Pmj8E988s=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EfXkIO7IbKBfogZ0kwrhHP+2IRb+X27smuUFgaS5XxdeoL0c2JbE8EhH0yGkLsszJg+gN+Q6T/ntLfn5uV3Iq06aEpmmkAsJbF7XVcNRDhhs52CCRNrxSDBQNjmvMlIUzaK7bjloPx2cayWE5z/jQQwmcXtfJppb/SCoo+/hjxQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=eWaeSMQJ; arc=none smtp.client-ip=95.215.58.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eWaeSMQJ" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763675281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=duWqcUo3510DqxytY/GVenrT9tSxQ9UeuFc0cdTfYbM=; b=eWaeSMQJPqqPNIPAvXp9MgXE4jXAhGJ0zcbjA0h1CD8RaHbmZW0NJazxty/ZHka3HqBEnv 5pMSxPSeaqo1LE9IFji32upJt7jYJvmPTaYBCS/Xo5+IW+jzmJ+H6D1/FbefRQyZTTNatP 9QTt6biOgkStaW93ltzicwHNzZmV6jA= From: Thorsten Blum To: Tyler Hicks , Christian Brauner , Eric Biggers , Ard Biesheuvel Cc: Thorsten Blum , ecryptfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ecryptfs: Drop redundant NUL termination in ecryptfs_parse_tag_70_packet Date: Thu, 20 Nov 2025 22:45:33 +0100 Message-ID: <20251120214535.5952-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" ecryptfs_to_hex() already NUL-terminates ->fnek_sig_hex. Drop the manual NUL termination. Signed-off-by: Thorsten Blum --- fs/ecryptfs/keystore.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index b5204ab3150d..87990c0d4e2d 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c @@ -908,7 +908,6 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *f= ilename_size, (*packet_size) +=3D s->packet_size_len; ecryptfs_to_hex(s->fnek_sig_hex, &data[(*packet_size)], ECRYPTFS_SIG_SIZE); - s->fnek_sig_hex[ECRYPTFS_SIG_SIZE_HEX] =3D '\0'; (*packet_size) +=3D ECRYPTFS_SIG_SIZE; s->cipher_code =3D data[(*packet_size)++]; rc =3D ecryptfs_cipher_code_to_string(s->cipher_string, s->cipher_code); --=20 2.51.1