267981508a
- merge parts of pkg/SECURITY into pkg/MESSAGE - fix license marker feedback and ok ajacoutot@
20 lines
758 B
Plaintext
20 lines
758 B
Plaintext
$OpenBSD: patch-src_md_c,v 1.4 2008/08/25 15:14:43 jasper Exp $
|
|
--- src/md.c.orig Sun Dec 28 09:12:38 2003
|
|
+++ src/md.c Fri Aug 22 20:32:04 2008
|
|
@@ -239,13 +239,13 @@ void md5_process_block (const void *buffer, unsigned c
|
|
/****************************************************/
|
|
/* convert the given md5sum into a printable string */
|
|
/****************************************************/
|
|
-void md5tostr(const unsigned char md5sum[MD5SUMLEN],char str[3*MD5SUMLEN+1])
|
|
+void md5tostr(const unsigned char md5sum[MD5SUMLEN],char str[3*MD5SUMLEN+1], size_t len)
|
|
{
|
|
int i;
|
|
for(i=0;i<MD5SUMLEN;i++)
|
|
{
|
|
unsigned int v=md5sum[i];
|
|
- sprintf(str+3*i,"%1u%1u%1u",v/100,(v%100)/10,v%10);
|
|
+ snprintf(str+3*i,len-3*i,"%1u%1u%1u",v/100,(v%100)/10,v%10);
|
|
}
|
|
}
|
|
|