Merged the hostap_2.6 updates, and the Leap of Faith work, from the hostap_update...
[mech_eap.git] / libeap / src / crypto / md4-internal.c
index d9f499f..d9c737a 100644 (file)
@@ -2,14 +2,8 @@
  * MD4 hash implementation
  * Copyright (c) 2006, Jouni Malinen <j@w1.fi>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  */
 
 #include "includes.h"
@@ -37,6 +31,9 @@ int md4_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac)
        MD4_CTX ctx;
        size_t i;
 
+       if (TEST_FAIL())
+               return -1;
+
        MD4Init(&ctx);
        for (i = 0; i < num_elem; i++)
                MD4Update(&ctx, addr[i], len[i]);