From 79bdd24d6ee1022e4a02fd00a490279c7f0a4f98 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Sun, 10 Dec 2023 23:04:50 -0500 Subject: Apply suggestions from code review Co-authored-by: Waffle Maybe --- compiler/rustc_codegen_ssa/src/back/metadata.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_codegen_ssa/src/back') diff --git a/compiler/rustc_codegen_ssa/src/back/metadata.rs b/compiler/rustc_codegen_ssa/src/back/metadata.rs index aaf75819e97..d5a223c1a7b 100644 --- a/compiler/rustc_codegen_ssa/src/back/metadata.rs +++ b/compiler/rustc_codegen_ssa/src/back/metadata.rs @@ -162,7 +162,7 @@ pub(super) fn get_metadata_xcoff<'a>(path: &Path, data: &'a [u8]) -> Result<&'a return Err(format!("Invalid metadata symbol offset: {offset}")); } // The offset specifies the location of rustc metadata in the comment section. - // The metadata is preceded by a 4-byte length field. + // The metadata is preceded by a 8-byte length field. let len = u64::from_le_bytes(info_data[(offset - 8)..offset].try_into().unwrap()) as usize; if offset + len > (info_data.len() as usize) { return Err(format!( -- cgit 1.4.1-3-g733a5