diff options
author | KWSys Robot <kwrobot@kitware.com> | 2014-04-07 13:49:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-08 17:06:10 (GMT) |
commit | c54be58309fbf9c2a5cfec8ba190c631e1db4a6c (patch) | |
tree | c6a26b0d8c412a123a336d3af842da72c800bcbf /MD5.c | |
parent | eccc425af6ffeb52963cc2dd94a36a24c271108b (diff) | |
download | CMake-c54be58309fbf9c2a5cfec8ba190c631e1db4a6c.zip CMake-c54be58309fbf9c2a5cfec8ba190c631e1db4a6c.tar.gz CMake-c54be58309fbf9c2a5cfec8ba190c631e1db4a6c.tar.bz2 |
KWSys 2014-04-07 (8b085635)
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ 8b085635 | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' 39f98b5d..8b085635
Rolf Eike Beer (2):
a99a9235 set the compile flags for older HP compilers to fix compilation
8b085635 MD5: avoid casting back and forth between size_t and int
Change-Id: I6386b521dbaba2e4f9ed5b2be34a504b9c17fc36
Diffstat (limited to 'MD5.c')
-rw-r--r-- | MD5.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -478,11 +478,16 @@ void kwsysMD5_Initialize(kwsysMD5* md5) /*--------------------------------------------------------------------------*/ void kwsysMD5_Append(kwsysMD5* md5, unsigned char const* data, int length) { + size_t dlen; if(length < 0) { - length = (int)strlen((char const*)data); + dlen = strlen((char const*)data); } - md5_append(&md5->md5_state, (md5_byte_t const*)data, (size_t)length); + else + { + dlen = (size_t)length; + } + md5_append(&md5->md5_state, (md5_byte_t const*)data, dlen); } /*--------------------------------------------------------------------------*/ |