This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 89e6fb9  apps/md5: fix md5 result error
89e6fb9 is described below

commit 89e6fb9a42f917b19e256d5b8e60881bd4bf0664
Author: ligd <[email protected]>
AuthorDate: Mon Jan 11 14:34:58 2021 +0800

    apps/md5: fix md5 result error
    
    MIRTOS-325
    
    Change-Id: I0dd6c3e155b8fe41fe8ea6859271168a0d283829
    Signed-off-by: ligd <[email protected]>
---
 nshlib/nsh_codeccmd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nshlib/nsh_codeccmd.c b/nshlib/nsh_codeccmd.c
index 4b70a90..b3944b8 100644
--- a/nshlib/nsh_codeccmd.c
+++ b/nshlib/nsh_codeccmd.c
@@ -257,7 +257,7 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int 
argc,
   static const unsigned char hexchars[] = "0123456789abcdef";
   MD5_CTX ctx;
   unsigned char mac[16];
-  FAR char *src;
+  FAR unsigned char *src;
   FAR char *dest;
 #endif
 
@@ -443,7 +443,7 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int 
argc,
           int i;
 
           md5_final(mac, &ctx);
-          src = (FAR char *)&mac;
+          src  = mac;
           dest = destbuf;
           for (i = 0; i < 16; i++, src++)
             {
@@ -481,7 +481,7 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int 
argc,
 
               func(srcbuf, srclen, (char *)&ctx, &buflen, 0);
               md5_final(mac, &ctx);
-              src = (char *)&mac;
+              src  = mac;
               dest = destbuf;
               for (i = 0; i < 16; i++, src++)
                 {

Reply via email to