summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1999-02-26 03:38:57 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1999-02-26 03:38:57 +0000
commitd4534a6de1dcb69b88ad8293a350e33d1b66f4d7 (patch)
tree9962573a77572e6b6bf650523eeebb2c711c1f1a
parentc58f68dcd543633df9509776ed20629150362c50 (diff)
Merge from the Ericsson repository
| revision 1.8 | date: 1999/02/25 11:38:55; author: niklas; state: Exp; lines: +3 -1 | include sysdep.h everywhere | ---------------------------- | revision 1.7 | date: 1999/02/06 15:00:36; author: niklas; state: Exp; lines: +3 -3 | memory allocation fix from Schmuel Siegel | ----------------------------
-rw-r--r--sbin/isakmpd/field.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/isakmpd/field.c b/sbin/isakmpd/field.c
index fe03c378dea..b4c63cecfff 100644
--- a/sbin/isakmpd/field.c
+++ b/sbin/isakmpd/field.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: field.c,v 1.4 1998/12/21 01:02:23 niklas Exp $ */
-/* $EOM: field.c,v 1.6 1998/11/27 17:12:22 niklas Exp $ */
+/* $OpenBSD: field.c,v 1.5 1999/02/26 03:38:56 niklas Exp $ */
+/* $EOM: field.c,v 1.8 1999/02/25 11:38:55 niklas Exp $ */
/*
* Copyright (c) 1998 Niklas Hallqvist. All rights reserved.
@@ -38,6 +38,8 @@
#include <stdlib.h>
#include <string.h>
+#include "sysdep.h"
+
#include "constants.h"
#include "field.h"
#include "log.h"
@@ -139,7 +141,7 @@ field_debug_mask (u_int8_t *buf, size_t len, struct constant_map **maps)
return 0;
/* Size for brackets, two spaces and a NUL terminator. */
- buf_sz = 5;
+ buf_sz = 4;
retval = malloc (buf_sz);
if (!retval)
return 0;
@@ -150,7 +152,7 @@ field_debug_mask (u_int8_t *buf, size_t len, struct constant_map **maps)
if (val & bit)
{
name = constant_name_maps (maps, bit);
- buf_sz += strlen (name);
+ buf_sz += strlen (name) + 1;
new_buf = realloc (retval, buf_sz);
if (!new_buf)
{