We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39db006 commit aea9b95Copy full SHA for aea9b95
services/status/src/ecup.rs
@@ -202,7 +202,7 @@ pub(crate) fn ecupdate_thread(sid: xous::SID) {
202
// the semver *could* be bogus at this point, but we'll validate the package (which contains the semver) before we use it.
203
// however, this check is much less computationally expensive than the package validation.
204
let length = u32::from_le_bytes(package[0x28..0x2c].try_into().unwrap());
205
- if length == 0xffff_ffff { // nothing was staged at all
+ if length > xous::EC_FW_PKG_LEN { // nothing was staged, or it is bogus (blank FLASH is 0xFFFF_FFFF "length")
206
xous::return_scalar(msg.sender, UpdateResult::PackageInvalid.to_usize().unwrap()).unwrap();
207
continue;
208
}
0 commit comments