You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[inline]
pub(crate) fn uncompress_unsorted_until_end(
compressed_data: &[u8],
output_arr: &mut [u32],
) -> usize {
let mut num_read_bytes = 0;
for (num_ints_written, output_mut) in output_arr.iter_mut().enumerate() {
if compressed_data.len() == num_read_bytes {
return num_ints_written;
}
let mut result = 0u32;
let mut shift = 0u32;
loop {
let cur_byte = compressed_data[num_read_bytes];
num_read_bytes += 1;
result += u32::from(cur_byte % 128u8) << shift;
if cur_byte & 128u8 != 0u8 {
break;
}
shift += 7;
}
*output_mut = result;
}
output_arr.len()
}
进入loop循环后,当循环次数增加时,num_read_bytes自增超出compressed_data长度,产生报错
(After entering a loop, when the number of cycles increases, the num_read_bytes automatically exceeds the length of compressed_data, and an error message is generated)
tantivy-0.22.0\src\postings\compression\vint.rs:97:28:
index out of bounds: the len is 26 but the index is 26
The text was updated successfully, but these errors were encountered:
#[inline]
pub(crate) fn uncompress_unsorted_until_end(
compressed_data: &[u8],
output_arr: &mut [u32],
) -> usize {
let mut num_read_bytes = 0;
for (num_ints_written, output_mut) in output_arr.iter_mut().enumerate() {
if compressed_data.len() == num_read_bytes {
return num_ints_written;
}
let mut result = 0u32;
let mut shift = 0u32;
loop {
let cur_byte = compressed_data[num_read_bytes];
num_read_bytes += 1;
result += u32::from(cur_byte % 128u8) << shift;
if cur_byte & 128u8 != 0u8 {
break;
}
shift += 7;
}
*output_mut = result;
}
output_arr.len()
}
进入loop循环后,当循环次数增加时,num_read_bytes自增超出compressed_data长度,产生报错
(After entering a loop, when the number of cycles increases, the num_read_bytes automatically exceeds the length of compressed_data, and an error message is generated)
tantivy-0.22.0\src\postings\compression\vint.rs:97:28:
index out of bounds: the len is 26 but the index is 26
The text was updated successfully, but these errors were encountered: