You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/12 03:18:17 UTC

[GitHub] [incubator-nuttx] PeterBee97 opened a new pull request #2285: libc/stdlib: Fix range check in strtoul(l)

PeterBee97 opened a new pull request #2285:
URL: https://github.com/apache/incubator-nuttx/pull/2285


   ## Summary
   The previous implementation of strtoul(l) is flawed. The range check assumed that when overflow happens, the truncated value is smaller than the original value. As a counter example, passing "10000000000" to strtol will not trigger ERANGE, but return a truncated value. This patch adds more accurate range checks.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2285: libc/stdlib: Fix range check in strtoul(l)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2285:
URL: https://github.com/apache/incubator-nuttx/pull/2285#issuecomment-725825361


   @PeterBee97 please fix the nxstyle warning:
   https://github.com/apache/incubator-nuttx/pull/2285/checks?check_run_id=1388495818


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2285: libc/stdlib: Fix range check in strtoul(l)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #2285:
URL: https://github.com/apache/incubator-nuttx/pull/2285


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org