The Samba-Bugzilla – Attachment 19173 Details for
Bug 16225
dns client problems related to EDNS usage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch for v4-25-test
bfixes-tmp425.txt (text/plain), 1.21 KB, created by
Stefan Metzmacher
on 2026-08-21 14:41:25 UTC
(
hide
)
Description:
Patch for v4-25-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2026-08-21 14:41:25 UTC
Size:
1.21 KB
patch
obsolete
>From 5539de77baa69efa6383fd56d33e9b844b3a056f Mon Sep 17 00:00:00 2001 >From: Jennifer Sutton <jennifersutton@catalyst.net.nz> >Date: Thu, 2 Jul 2026 16:43:39 +1200 >Subject: [PATCH] libcli/dns: Do not pass NULL pointer to memcpy() > >To do so is to invoke undefined behaviour. > >Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz> >Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> >(cherry picked from commit 4e0d3953e9c6974c4c4fe3fe0ee76d86042d9c37) >BUG: https://bugzilla.samba.org/show_bug.cgi?id=16225 >--- > libcli/dns/dns.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/libcli/dns/dns.c b/libcli/dns/dns.c >index 5087715b5e7c..2fd4a32f58c1 100644 >--- a/libcli/dns/dns.c >+++ b/libcli/dns/dns.c >@@ -119,9 +119,11 @@ static struct tevent_req *dns_udp_request_send( > if (tevent_req_nomem(udp_q->additional, req)) { > return tevent_req_post(req, ev); > } >- memcpy(udp_q->additional, >- _q->additional, >- sizeof(struct dns_res_rec) * _q->arcount); >+ if (_q->additional != NULL) { >+ memcpy(udp_q->additional, >+ _q->additional, >+ sizeof(struct dns_res_rec) * _q->arcount); >+ } > > udp_q->additional[_q->arcount] = (struct dns_res_rec){ > .name = "", >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 16225
: 19173 |
19174
|
19175