summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--umac.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 23145d7ad..f0ae35d62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,6 +49,9 @@
49 [sshpty.c] 49 [sshpty.c]
50 remove #if defined block not needed; ok markus@ dtucker@ 50 remove #if defined block not needed; ok markus@ dtucker@
51 NB. RCS ID sync only 51 NB. RCS ID sync only
52 - stevesk@cvs.openbsd.org 2007/09/12 19:39:19
53 [umac.c]
54 use xmalloc() and xfree(); ok markus@ pvalchev@
52 55
5320070914 5620070914
54 - (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path. 57 - (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path.
@@ -3246,4 +3249,4 @@
3246 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3249 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3247 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3250 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3248 3251
3249$Id: ChangeLog,v 1.4753 2007/09/17 06:10:21 djm Exp $ 3252$Id: ChangeLog,v 1.4754 2007/09/17 06:11:01 djm Exp $
diff --git a/umac.c b/umac.c
index c2fdcf448..ca5e08b3e 100644
--- a/umac.c
+++ b/umac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: umac.c,v 1.1 2007/06/07 19:37:34 pvalchev Exp $ */ 1/* $OpenBSD: umac.c,v 1.2 2007/09/12 19:39:19 stevesk Exp $ */
2/* ----------------------------------------------------------------------- 2/* -----------------------------------------------------------------------
3 * 3 *
4 * umac.c -- C Implementation UMAC Message Authentication 4 * umac.c -- C Implementation UMAC Message Authentication
@@ -66,6 +66,7 @@
66#include "includes.h" 66#include "includes.h"
67#include <sys/types.h> 67#include <sys/types.h>
68 68
69#include "xmalloc.h"
69#include "umac.h" 70#include "umac.h"
70#include <string.h> 71#include <string.h>
71#include <stdlib.h> 72#include <stdlib.h>
@@ -1196,7 +1197,7 @@ int umac_delete(struct umac_ctx *ctx)
1196 if (ctx) { 1197 if (ctx) {
1197 if (ALLOC_BOUNDARY) 1198 if (ALLOC_BOUNDARY)
1198 ctx = (struct umac_ctx *)ctx->free_ptr; 1199 ctx = (struct umac_ctx *)ctx->free_ptr;
1199 free(ctx); 1200 xfree(ctx);
1200 } 1201 }
1201 return (1); 1202 return (1);
1202} 1203}
@@ -1212,7 +1213,7 @@ struct umac_ctx *umac_new(u_char key[])
1212 size_t bytes_to_add; 1213 size_t bytes_to_add;
1213 aes_int_key prf_key; 1214 aes_int_key prf_key;
1214 1215
1215 octx = ctx = malloc(sizeof(*ctx) + ALLOC_BOUNDARY); 1216 octx = ctx = xmalloc(sizeof(*ctx) + ALLOC_BOUNDARY);
1216 if (ctx) { 1217 if (ctx) {
1217 if (ALLOC_BOUNDARY) { 1218 if (ALLOC_BOUNDARY) {
1218 bytes_to_add = ALLOC_BOUNDARY - 1219 bytes_to_add = ALLOC_BOUNDARY -