Skip to content

Commit f032de6

Browse files
Flavio Ceolinnashif
authored andcommitted
sys: usermode: Document 0 size buffer memory check
Documenting that 0 size buffer has undefined behavior. See: #23239 Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 91d2d7d commit f032de6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/include/kernel_internal.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ extern void z_arch_mem_domain_destroy(struct k_mem_domain *domain);
137137
* if the supplied memory buffer spans multiple enabled memory management
138138
* regions (even if all such regions permit user access).
139139
*
140+
* @warning 0 size buffer has undefined behavior.
141+
*
140142
* @param addr start address of the buffer
141143
* @param size the size of the buffer
142144
* @param write If nonzero, additionally check if the area is writable.

0 commit comments

Comments
 (0)