This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/18665] In send_dg, the recvfrom function is NOT always using the buffer size of a newly created buffer.
- From: "rhollida at ciena dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 14 Jul 2015 21:42:53 +0000
- Subject: [Bug network/18665] In send_dg, the recvfrom function is NOT always using the buffer size of a newly created buffer.
- Auto-submitted: auto-generated
- References: <bug-18665-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18665
--- Comment #3 from Robert <rhollida at ciena dot com> ---
This is my suggested fix for this issue:
Use the size pointer *thisanssizp, instead of *thisansp, when creating the new
buffer.
u_char *newp = malloc (MAXPACKET);
if (newp != NULL) {
<*anssizp = MAXPACKET;> :REMOVED LINE:
*thisanssizp = MAXPACKET; :ADDED LINE:
*thisansp = ans = newp;
if (thisansp == ansp2)
*ansp2_malloced = 1;
--
You are receiving this mail because:
You are on the CC list for the bug.