浏览代码

Correct cast MD5 bytes

The size is used as a seed for the start of the MD5 rountine and must
be cast to the correct type.
Matt Clarkson 10 年之前
父节点
当前提交
06cdd07357
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/md5.inl

+ 1 - 1
src/md5.inl

@@ -416,7 +416,7 @@ md5_append(md5_state_t *pms, const md5_byte_t *data, size_t nbytes)
 		return;
 
 	/* Update the message length. */
-	pms->count[1] += nbytes >> 29;
+	pms->count[1] += (md5_word_t)(nbytes >> 29);
 	pms->count[0] += nbits;
 	if (pms->count[0] < nbits)
 		pms->count[1]++;