diff options
author | Haru <haru@dotalux.com> | 2015-01-24 03:42:16 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-01-24 03:42:36 +0100 |
commit | a75714ca455c728d34918dd12200fcec87ebc0d4 (patch) | |
tree | d95d174b239a14fafdb8e824bad4a9c81a5a5a80 /src/common/md5calc.c | |
parent | df8d6560fc7eb34806d27d28b8b7dbce36868c24 (diff) | |
download | hercules-a75714ca455c728d34918dd12200fcec87ebc0d4.tar.gz hercules-a75714ca455c728d34918dd12200fcec87ebc0d4.tar.bz2 hercules-a75714ca455c728d34918dd12200fcec87ebc0d4.tar.xz hercules-a75714ca455c728d34918dd12200fcec87ebc0d4.zip |
Fixed 18 minor issues
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/md5calc.c')
-rw-r--r-- | src/common/md5calc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/md5calc.c b/src/common/md5calc.c index 18e502da2..7b31a38d6 100644 --- a/src/common/md5calc.c +++ b/src/common/md5calc.c @@ -222,12 +222,12 @@ void MD5_Binary(const char * string, unsigned char * output) } /** output is the coded character sequence in the character sequence which wants to code string. */ -void MD5_String(const char * string, char * output) +void MD5_String(const char *string, char *output) { unsigned char digest[16]; MD5_String2binary(string,digest); - sprintf(output, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", + snprintf(output, 33, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", digest[ 0], digest[ 1], digest[ 2], digest[ 3], digest[ 4], digest[ 5], digest[ 6], digest[ 7], digest[ 8], digest[ 9], digest[10], digest[11], |