2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 22:05:23 +00:00

[master] Corrects medium impact issues reported by Coverity.

Merges in rt36933
This commit is contained in:
Thomas Markwalder
2014-08-28 07:56:20 -04:00
parent 36e2c22493
commit a07d99bbef
13 changed files with 70 additions and 42 deletions

View File

@@ -236,10 +236,9 @@ ddns_updates(struct packet *packet, struct lease *lease, struct lease *old,
goto out;
}
buffer_allocate (&ddns_fwd_name.buffer,
ddns_hostname.len + ddns_domainname.len + 2,
MDL);
if (ddns_fwd_name.buffer) {
if (buffer_allocate (&ddns_fwd_name.buffer,
ddns_hostname.len +
ddns_domainname.len + 2, MDL)) {
ddns_fwd_name.data = ddns_fwd_name.buffer->data;
data_string_append (&ddns_fwd_name, &ddns_hostname);
ddns_fwd_name.buffer->data[ddns_fwd_name.len] = '.';
@@ -438,8 +437,8 @@ ddns_updates(struct packet *packet, struct lease *lease, struct lease *old,
}
if (s1) {
buffer_allocate(&ddns_cb->rev_name.buffer, rev_name_len, MDL);
if (ddns_cb->rev_name.buffer != NULL) {
if (buffer_allocate(&ddns_cb->rev_name.buffer,
rev_name_len, MDL)) {
struct data_string *rname = &ddns_cb->rev_name;
rname->data = rname->buffer->data;