Skip to content

Commit d73808b

Browse files
tomchyrlubos
authored andcommitted
zigbee: osif: Fix checks in NVRAM write routines
It is allowed to write the whole page (including the last byte), so the comparison should not fail in case of the last write on the NVRAM page. Signed-off-by: Tomasz Chyrowicz <[email protected]>
1 parent 612d8ec commit d73808b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/zigbee/osif/zb_nrf_nvram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ zb_ret_t zb_osif_nvram_write(zb_uint8_t page, zb_uint32_t pos, void *buf,
107107
return RET_PAGE_NOT_FOUND;
108108
}
109109

110-
if (pos + len >= zb_get_nvram_page_length()) {
110+
if (pos + len > zb_get_nvram_page_length()) {
111111
return RET_INVALID_PARAMETER;
112112
}
113113

0 commit comments

Comments
 (0)