mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-29 05:17:57 +00:00
[#15,!10] Minor changes to eliminate warnings under GCC 9
added release note common/parse.c parse_warn() - upped format buffer size to squelch warning includes/dhcpd.h struct interface_info - bumped name size by 1 to squelch warning relay/dhcrelay.c request_v4_interface() - replace strncpy with memcpy to squelch warning (len is already checked above it) server/confpars.c parse_failover_peer() - pass token value into log_fatal calls rather than null pointer
This commit is contained in:
parent
9bb1ce3386
commit
753d458b1f
3
RELNOTES
3
RELNOTES
@ -135,6 +135,9 @@ by Eric Young (eay@cryptsoft.com).
|
|||||||
and submitting a patch.
|
and submitting a patch.
|
||||||
[ISC-Bugs #13,!7 git dfcbe359ab278cad70015994ca73ef50d626b23a]
|
[ISC-Bugs #13,!7 git dfcbe359ab278cad70015994ca73ef50d626b23a]
|
||||||
|
|
||||||
|
- Made minor changes to eliminate warnings when compiled with GCC 9.
|
||||||
|
[ISC-Bugs #15,!10] git #TBD]
|
||||||
|
|
||||||
Changes since 4.4.0 (New Features)
|
Changes since 4.4.0 (New Features)
|
||||||
- none
|
- none
|
||||||
Changes since 4.4.0 (Bug Fixes)
|
Changes since 4.4.0 (Bug Fixes)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Common parser code for dhcpd and dhclient. */
|
Common parser code for dhcpd and dhclient. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
@ -5567,7 +5567,7 @@ int parse_warn (struct parse *cfile, const char *fmt, ...)
|
|||||||
va_list list;
|
va_list list;
|
||||||
char lexbuf [256];
|
char lexbuf [256];
|
||||||
char mbuf [1024];
|
char mbuf [1024];
|
||||||
char fbuf [1024];
|
char fbuf [2048];
|
||||||
unsigned i, lix;
|
unsigned i, lix;
|
||||||
|
|
||||||
do_percentm (mbuf, fmt);
|
do_percentm (mbuf, fmt);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Definitions for dhcpd... */
|
Definitions for dhcpd... */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2018 by Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1996-2003 by Internet Software Consortium
|
* Copyright (c) 1996-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
@ -1392,7 +1392,7 @@ struct interface_info {
|
|||||||
interface (if any). */
|
interface (if any). */
|
||||||
unsigned remote_id_len; /* Length of Remote ID. */
|
unsigned remote_id_len; /* Length of Remote ID. */
|
||||||
|
|
||||||
char name [IFNAMSIZ]; /* Its name... */
|
char name [IFNAMSIZ+1]; /* Its name... */
|
||||||
int index; /* Its if_nametoindex(). */
|
int index; /* Its if_nametoindex(). */
|
||||||
int rfdesc; /* Its read file descriptor. */
|
int rfdesc; /* Its read file descriptor. */
|
||||||
int wfdesc; /* Its write file descriptor, if
|
int wfdesc; /* Its write file descriptor, if
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
DHCP/BOOTP Relay Agent. */
|
DHCP/BOOTP Relay Agent. */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright(c) 2004-2018 by Internet Systems Consortium, Inc.("ISC")
|
* Copyright(c) 2004-2019 by Internet Systems Consortium, Inc.("ISC")
|
||||||
* Copyright(c) 1997-2003 by Internet Software Consortium
|
* Copyright(c) 1997-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
@ -2119,7 +2119,7 @@ void request_v4_interface(const char* name, int flags) {
|
|||||||
(flags & INTERFACE_UPSTREAM ? 'Y' : 'N'),
|
(flags & INTERFACE_UPSTREAM ? 'Y' : 'N'),
|
||||||
(flags & INTERFACE_DOWNSTREAM ? 'Y' : 'N'));
|
(flags & INTERFACE_DOWNSTREAM ? 'Y' : 'N'));
|
||||||
|
|
||||||
strncpy(tmp->name, name, len);
|
memcpy(tmp->name, name, len);
|
||||||
interface_snorf(tmp, (INTERFACE_REQUESTED | flags));
|
interface_snorf(tmp, (INTERFACE_REQUESTED | flags));
|
||||||
interface_dereference(&tmp, MDL);
|
interface_dereference(&tmp, MDL);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
Parser for dhcpd config file... */
|
Parser for dhcpd config file... */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2004-2017 by Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (c) 2004-2019 by Internet Systems Consortium, Inc. ("ISC")
|
||||||
* Copyright (c) 1995-2003 by Internet Software Consortium
|
* Copyright (c) 1995-2003 by Internet Software Consortium
|
||||||
*
|
*
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
@ -911,7 +911,7 @@ void parse_failover_peer (cfile, group, type)
|
|||||||
if (is_identifier (token) || token == STRING) {
|
if (is_identifier (token) || token == STRING) {
|
||||||
name = dmalloc (strlen (val) + 1, MDL);
|
name = dmalloc (strlen (val) + 1, MDL);
|
||||||
if (!name)
|
if (!name)
|
||||||
log_fatal ("no memory for peer name %s", name);
|
log_fatal ("no memory for peer name %s", val);
|
||||||
strcpy (name, val);
|
strcpy (name, val);
|
||||||
} else {
|
} else {
|
||||||
parse_warn (cfile, "expecting failover peer name.");
|
parse_warn (cfile, "expecting failover peer name.");
|
||||||
@ -1226,7 +1226,7 @@ void parse_failover_state_declaration (struct parse *cfile,
|
|||||||
name = dmalloc (strlen (val) + 1, MDL);
|
name = dmalloc (strlen (val) + 1, MDL);
|
||||||
if (!name)
|
if (!name)
|
||||||
log_fatal ("failover peer name %s: no memory",
|
log_fatal ("failover peer name %s: no memory",
|
||||||
name);
|
val);
|
||||||
strcpy (name, val);
|
strcpy (name, val);
|
||||||
} else {
|
} else {
|
||||||
parse_warn (cfile, "expecting failover peer name.");
|
parse_warn (cfile, "expecting failover peer name.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user