فهرست منبع

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]++;