Skip to content

Commit

Permalink
fix bug - check recv update msg length
Browse files Browse the repository at this point in the history
  • Loading branch information
cyh2018git authored Feb 16, 2019
1 parent 3a78686 commit 9ee9f12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/ota/sota/sota.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9ee9f12

Please sign in to comment.