From 9ee9f12210bde6797c09059aa70f66088e91c344 Mon Sep 17 00:00:00 2001 From: cyh2018git Date: Sat, 16 Feb 2019 20:09:02 +0800 Subject: [PATCH] fix bug - check recv update msg length --- components/ota/sota/sota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ota/sota/sota.c b/components/ota/sota/sota.c index 16306fad0..e03057e8e 100644 --- a/components/ota/sota/sota.c +++ b/components/ota/sota/sota.c @@ -469,7 +469,7 @@ int32_t sota_process(void *arg, const int8_t *buf, int32_t buflen) } case MSG_GET_BLOCK: { - if (phead->data_len > BLOCK_HEAD) + if (phead->data_len > 0) { ret = sota_data_block_process(phead, pbuf); }