Skip to contentSkip to conversation

ecryptfs: Drop redundant NUL termination in ecryptfs_parse_tag_70_packet

PATCH New Thorsten Blum 1 participant 1 message Nov 20, 2025 Ecrypt file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ecryptfs: Drop redundant NUL termination in ecryptfs_parse_tag_70_packet

ecryptfs_to_hex() already NUL-terminates ->fnek_sig_hex. Drop the manual NUL termination.

---
 fs/ecryptfs/keystore.c | 1 -
 1 file changed, 1 deletion(-)
fs/ecryptfs/keystore.c +0 -1
index b5204ab3150d..87990c0d4e2d 100644
@@ -908,7 +908,6 @@ ecryptfs_parse_tag_70_packet(char **filename, size_t *filename_size,
 	(*packet_size) += 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] = '\0';
 	(*packet_size) += ECRYPTFS_SIG_SIZE;
 	s->cipher_code = data[(*packet_size)++];
 	rc = ecryptfs_cipher_code_to_string(s->cipher_string, s->cipher_code);
Signature · 1 line
2.51.1