diff options
Diffstat (limited to 'sbin/ipsec/photurisd/config.c')
-rw-r--r-- | sbin/ipsec/photurisd/config.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sbin/ipsec/photurisd/config.c b/sbin/ipsec/photurisd/config.c index 1dbd1c02c4a..8b58f2ca048 100644 --- a/sbin/ipsec/photurisd/config.c +++ b/sbin/ipsec/photurisd/config.c @@ -1,5 +1,5 @@ /* - * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> + * Copyright 1997,1998 Niels Provos <provos@physnet.uni-hamburg.de> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: config.c,v 1.6 1998/03/04 11:43:15 provos Exp $"; +static char rcsid[] = "$Id: config.c,v 1.7 1998/05/18 21:25:20 provos Exp $"; #endif #define _CONFIG_C_ @@ -926,6 +926,11 @@ pick_attrib(struct stateob *st, u_int8_t **attrib, u_int16_t *attribsize) } } } + if (count == 0) { + log_error(0, "no attributes in attribute list for %s in pick_attrib()", + st->address); + return -1; + } if ((*attrib = calloc(count, sizeof(u_int8_t))) == NULL) { log_error(1, "calloc() in in pick_attrib()"); |