From a4193d929db2a8a8dc7d3cb2b2d721addd6e1d93 Mon Sep 17 00:00:00 2001 From: Fully Homomorphic Encryption Team Date: Fri, 1 Aug 2025 11:27:59 -0700 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 789832358 --- transpiler/examples/redact_ssn/redact_ssn.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transpiler/examples/redact_ssn/redact_ssn.cc b/transpiler/examples/redact_ssn/redact_ssn.cc index b7815e9..f9404b5 100644 --- a/transpiler/examples/redact_ssn/redact_ssn.cc +++ b/transpiler/examples/redact_ssn/redact_ssn.cc @@ -9,7 +9,7 @@ void RedactSsn(char my_string[MAX_LENGTH]) { int consecutive_digits_p2 = 0; #pragma hls_unroll yes - for (int i = 0; i < MAX_LENGTH; i++) { + for (int i = 0; i < MAX_LENGTH && my_string[i] != '\0'; i++) { if (my_string[i] >= '0' && my_string[i] <= '9') { consecutive_digits_p1++; consecutive_digits_p2++;