mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
catch serialization buffer edge case
if the buffer fills up to the point where there isn't enough space for the 8-bytes of header, a split_at() call will fail before the routine even gets to decide if the record can fit. abort the loop if the buffer is that full.
This commit is contained in:
parent
c82a79dab9
commit
d63c452fb6
1 changed files with 4 additions and 0 deletions
|
|
@ -1500,6 +1500,10 @@ fn wrapped_main() -> ! {
|
|||
Failure(String)
|
||||
}
|
||||
loop {
|
||||
if buf.len() < size_of::<u32>() * 2 {
|
||||
// not enough space to hold our header records, break and get a new buf
|
||||
break;
|
||||
}
|
||||
#[cfg(feature="perfcounter")]
|
||||
pddb_os.perf_entry(FILE_ID_SERVICES_PDDB_SRC_MAIN, perflib::PERFMETA_STARTBLOCK, 6, std::line!());
|
||||
let ser_result: SerializeResult =
|
||||
|
|
|
|||
Loading…
Reference in a new issue