Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
dhcp
Commits
8c785e79
Commit
8c785e79
authored
Jun 20, 2017
by
Thomas Markwalder
Browse files
[master] Added allocation failure error messages to two locations
Merges in rt41185.
parent
ca22af89
Changes
3
Hide whitespace changes
Inline
Side-by-side
RELNOTES
View file @
8c785e79
...
...
@@ -153,6 +153,10 @@ by Eric Young (eay@cryptsoft.com).
[ISC-Bugs #45290]
[ISC-Bugs #33377]
- Added error logging to two memory allocation failure checks. Thanks to Bill
Parker (wp02855 at gmail dot com) for reporting the issue.
[ISC-Bugs #41185]
Changes since 4.3.0 (bug fixes)
- Tidy up several small tickets.
...
...
client/dhclient.c
View file @
8c785e79
...
...
@@ -4224,8 +4224,11 @@ void client_envadd (struct client_state *client,
val
=
dmalloc
(
strlen
(
prefix
)
+
strlen
(
name
)
+
1
/* = */
+
len
+
sizeof
*
val
,
MDL
);
if
(
!
val
)
if
(
!
val
)
{
log_error
(
"client_envadd: cannot allocate space for variable"
);
return
;
}
s
=
val
->
string
;
strcpy
(
s
,
prefix
);
strcat
(
s
,
name
);
...
...
@@ -4235,8 +4238,10 @@ void client_envadd (struct client_state *client,
va_start
(
list
,
fmt
);
vsnprintf
(
s
,
len
+
1
,
fmt
,
list
);
va_end
(
list
);
}
else
}
else
{
strcpy
(
s
,
spbuf
);
}
val
->
next
=
client
->
env
;
client
->
env
=
val
;
client
->
envc
++
;
...
...
common/discover.c
View file @
8c785e79
...
...
@@ -3,7 +3,7 @@
Find and identify the network interfaces. */
/*
* Copyright (c) 2004-201
6
by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004-201
7
by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1995-2003 by Internet Software Consortium
*
* Permission to use, copy, modify, and distribute this software for any
...
...
@@ -1491,8 +1491,11 @@ void interface_stash (struct interface_info *tptr)
delta
=
tptr
->
index
-
interface_max
+
10
;
vec
=
dmalloc
((
interface_max
+
delta
)
*
sizeof
(
struct
interface_info
*
),
MDL
);
if
(
!
vec
)
if
(
!
vec
)
{
log_error
(
"interface_stash: allocation failed "
);
return
;
}
memset
(
&
vec
[
interface_max
],
0
,
(
sizeof
(
struct
interface_info
*
))
*
delta
);
interface_max
+=
delta
;
...
...
@@ -1502,8 +1505,10 @@ void interface_stash (struct interface_info *tptr)
sizeof
(
struct
interface_info
*
)));
dfree
(
interface_vector
,
MDL
);
}
interface_vector
=
vec
;
}
interface_reference
(
&
interface_vector
[
tptr
->
index
],
tptr
,
MDL
);
if
(
tptr
->
index
>=
interface_count
)
interface_count
=
tptr
->
index
+
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment