- MD_Update(&m,&(state[st_idx]),j);
-
- MD_Update(&m,buf,j);
- MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c));
- MD_Final(&m,local_md);
+ if (!MD_Update(&m,&(state[st_idx]),j))
+ goto err;
+
+ /* DO NOT REMOVE THE FOLLOWING CALL TO MD_Update()! */
+ if (!MD_Update(&m,buf,j))
+ goto err;
+ /* We know that line may cause programs such as
+ purify and valgrind to complain about use of
+ uninitialized data. The problem is not, it's
+ with the caller. Removing that line will make
+ sure you get really bad randomness and thereby
+ other problems such as very insecure keys. */
+
+ if (!MD_Update(&m,(unsigned char *)&(md_c[0]),sizeof(md_c)))
+ goto err;
+ if (!MD_Final(&m,local_md))
+ goto err;