Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main-src > by-pkgid > 4cb58acf0bfdd2aaf21efc32197a6da2 > files > 4

openCryptoki-2.2.4-22.el5_4.2.src.rpm

--- opencryptoki-2.2.4/usr/lib/pkcs11/ica_s390_stdll/ica_specific.c	2006-08-24 17:55:15.000000000 -0300
+++ opencryptoki-2.2.4/usr/lib/pkcs11/ica_s390_stdll/ica_specific.c.new	2009-06-10 10:32:19.000000000 -0300
@@ -774,12 +774,14 @@
 				 * empty part of save data, so adjust in_data_len
 				 */
 				in_data_len -= fill_size;
-			
+				
+				/* Save the _last_ oc_sha_ctx->tail_len bytes from in_data
+				 * Rajiv - 2009 */
 				oc_sha_ctx->tail_len = in_data_len & 0x3f;
 				if(oc_sha_ctx->tail_len) {
-					memcpy(oc_sha_ctx->tail, in_data + fill_size, 
+					in_data_len &= ~0x3f;
+					memcpy(oc_sha_ctx->tail, in_data + fill_size + in_data_len, 
 							oc_sha_ctx->tail_len);
-					in_data_len &= ~0x3f;	
 				}
 			} else {
 				/* This is the odd case, where we need to go ahead and