casaroli commented on code in PR #21330:
URL: https://github.com/apache/nuttx/pull/21330#discussion_r4436805456
##########
mm/umm_heap/umm_sbrk.c:
##########
@@ -100,6 +100,13 @@ FAR void *sbrk(intptr_t incr)
/* Convert the increment to multiples of the page size */
pgincr = MM_NPAGES(incr);
Review Comment:
`pgalloc()` takes `unsigned int npages` (include/nuttx/arch.h:840), so a
`uintptr_t` pgincr is cut to `unsigned int` at the call; the check above
catches exactly that case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]