giorgiozoppi commented on issue #9: SonarCube review. URL: https://github.com/apache/incubator-milagro-crypto-c/issues/9#issuecomment-502566060 The reason is that it is a library function so an user could do: char dst[2]; octect value // put a value bigger than 2 in the octect. OCT_toHex(value,dst); An here the library doesnt defend itself against buffer overflows. Here a consistent paper : https://www.sudo.ws/todd/papers/strlcpy.html The other concern is the snprintf, but it is ok if we support from C99 to C11. In C89 snprintf is not yet standardized. In the '90 i have memories that people used to have its own portable snprintf.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
