File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -712,7 +712,7 @@ static int wolfssl_init(void)
712712 unsigned int text_hash = hash_span ((const u8 * )__wc_text_start , (const u8 * )__wc_text_end , 1 );
713713 unsigned int rodata_hash = hash_span ((const u8 * )__wc_rodata_start , (const u8 * )__wc_rodata_end , 1 );
714714 u8 * canon_buf = malloc (WOLFSSL_SEGMENT_CANONICALIZER_BUFSIZ );
715- ssize_t cur_reloc_index = -1 ;
715+ ssize_t cur_reloc_index ;
716716 const u8 * text_p = (const u8 * )__wc_text_start ;
717717 const u8 * rodata_p = (const u8 * )__wc_rodata_start ;
718718 unsigned int stabilized_text_hash = 1 ;
@@ -726,6 +726,7 @@ static int wolfssl_init(void)
726726 reloc_counts .text = reloc_counts .rodata = reloc_counts .rwdata = reloc_counts .bss =
727727 reloc_counts .other = 0 ;
728728
729+ cur_reloc_index = -1 ;
729730 while (text_p < (const u8 * )__wc_text_end ) {
730731 size_t text_in_out_len = min (WOLFSSL_SEGMENT_CANONICALIZER_BUFSIZ ,
731732 (size_t )((const u8 * )__wc_text_end - text_p ));
@@ -748,6 +749,7 @@ static int wolfssl_init(void)
748749 }
749750
750751 /* note verifyCore is hashed along with the rest of .rodata_wolfcrypt. */
752+ cur_reloc_index = -1 ;
751753 while (rodata_p < (const u8 * )__wc_rodata_end ) {
752754 size_t rodata_in_out_len = min (WOLFSSL_SEGMENT_CANONICALIZER_BUFSIZ ,
753755 (size_t )((const u8 * )__wc_rodata_end - rodata_p ));
You can’t perform that action at this time.
0 commit comments