You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@milagro.apache.org by GitBox <gi...@apache.org> on 2019/06/17 07:00:52 UTC

[GitHub] [incubator-milagro-crypto-c] kealan commented on issue #9: SonarCube review.

kealan commented on issue #9: SonarCube review.
URL: https://github.com/apache/incubator-milagro-crypto-c/issues/9#issuecomment-502559218
 
 
   Hi Giorgio 
   
   We are using Travis-CI and coveralls.io which are both enabled. If you want to add this analysis tool to the CI the please do so. With regards to the security issue I don't think it is real but I happy to merge a PR that fixes it to get a clean report.
   
   At the moment the lib is built with c99 so I am not sure why you raise this an issue? 
   
   Why not just do this?
   
   /* Convert an octet to a hex string */
   void OCT_toHex(octet *src,char *dst)
   {
       int i;
       int l=3;
       unsigned char ch;
       for (i=0; i<src->len; i++)
       {
           ch=src->val[i];
           snprintf(&dst[i*2],l,"%02x", ch);
       }
   }
   
   /* Encode binary string */
   void amcl_bin2hex(char *src, char *dst, int src_len)
   {
       int i;
       int l=3;
       for (i = 0; i < src_len; i++)
       {
         snprintf(&dst[i*2],l,"%02x", (unsigned char) src[i]);
       }
   }
   
   

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


With regards,
Apache Git Services