Fixed multiple use of GCM-context bug due to split-up of GCM functions
diff --git a/library/gcm.c b/library/gcm.c
index f0bacc6..3e9969d 100644
--- a/library/gcm.c
+++ b/library/gcm.c
@@ -181,7 +181,12 @@
     const unsigned char *p;
     size_t use_len;
 
+    memset( ctx->y, 0x00, sizeof(ctx->y) );
+    memset( ctx->buf, 0x00, sizeof(ctx->buf) );
+
     ctx->mode = mode;
+    ctx->len = 0;
+    ctx->add_len = 0;
 
     if( iv_len == 12 )
     {