mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Fix a crash on license server connectivity failing.
This commit is contained in:
parent
33e6e32473
commit
ff66424677
1199
src/rust/Cargo.lock
generated
1199
src/rust/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -144,6 +144,10 @@ pub async fn exchange_keys_with_license_server(
|
||||
}
|
||||
|
||||
fn decode_response(buf: &[u8]) -> Result<LicenseReply, LicenseCheckError> {
|
||||
if buf.len() < 2 + std::mem::size_of::<u64>() {
|
||||
log::error!("License server returned an invalid response");
|
||||
return Err(LicenseCheckError::DeserializeFail);
|
||||
}
|
||||
const U64SIZE: usize = std::mem::size_of::<u64>();
|
||||
let version_buf = &buf[0..2]
|
||||
.try_into()
|
||||
|
Loading…
Reference in New Issue
Block a user