Skip to content

Commit

Permalink
sys: usermode: Document 0 size buffer memory check
Browse files Browse the repository at this point in the history
Documenting that 0 size buffer has undefined behavior.
See: #23239

Signed-off-by: Flavio Ceolin <[email protected]>
  • Loading branch information
Flavio Ceolin committed Mar 24, 2020
1 parent 15c2573 commit edf2f0b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel/include/kernel_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ extern void z_arch_mem_domain_destroy(struct k_mem_domain *domain);
* if the supplied memory buffer spans multiple enabled memory management
* regions (even if all such regions permit user access).
*
* @warning 0 size buffer has undefined behavior.
*
* @param addr start address of the buffer
* @param size the size of the buffer
* @param write If nonzero, additionally check if the area is writable.
Expand Down

0 comments on commit edf2f0b

Please sign in to comment.