Browse Source

r9689@catbus: nickm | 2007-01-19 22:34:20 -0500
And remove another strcpy.


svn:r9375

Nick Mathewson 19 years ago
parent
commit
ef0720f909
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/common/crypto.c

+ 1 - 1
src/common/crypto.c

@@ -1027,7 +1027,7 @@ crypto_pk_get_fingerprint(crypto_pk_env_t *pk, char *fp_out, int add_space)
                          NEVER_TERMINATE)<0)
                          NEVER_TERMINATE)<0)
       return -1;
       return -1;
   } else {
   } else {
-    strcpy(fp_out, hexdigest);
+    strncpy(fp_out, hexdigest, HEX_DIGEST_LEN+1);
   }
   }
   return 0;
   return 0;
 }
 }