* [PATCH v5] ifaddrs: Get rid of alloca
@ 2023-06-01 16:43 Joe Simmons-Talbott
2023-06-09 15:01 ` Joe Simmons-Talbott
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Joe Simmons-Talbott @ 2023-06-01 16:43 UTC (permalink / raw)
To: libc-alpha; +Cc: Joe Simmons-Talbott
Use scratch_buffer and malloc rather than alloca to avoid potential stack
overflows.
---
Changes to v4:
* Don't use a cleanup handler.
sysdeps/unix/sysv/linux/ifaddrs.c | 46 ++++++++++++++-----------------
1 file changed, 20 insertions(+), 26 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
index 184ee224cb..a10e8d9292 100644
--- a/sysdeps/unix/sysv/linux/ifaddrs.c
+++ b/sysdeps/unix/sysv/linux/ifaddrs.c
@@ -16,13 +16,13 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <alloca.h>
#include <assert.h>
#include <errno.h>
#include <ifaddrs.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netpacket/packet.h>
+#include <scratch_buffer.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
@@ -131,26 +131,14 @@ __netlink_request (struct netlink_handle *h, int type)
ssize_t read_len;
bool done = false;
-#ifdef PAGE_SIZE
- /* Help the compiler optimize out the malloc call if PAGE_SIZE
- is constant and smaller or equal to PTHREAD_STACK_MIN/4. */
- const size_t buf_size = PAGE_SIZE;
-#else
- const size_t buf_size = __getpagesize ();
-#endif
- bool use_malloc = false;
- char *buf;
-
- if (__libc_use_alloca (buf_size))
- buf = alloca (buf_size);
- else
- {
- buf = malloc (buf_size);
- if (buf != NULL)
- use_malloc = true;
- else
- goto out_fail;
- }
+ /* Netlink requires that user buffer needs to be either 8kb or page size
+ (whichever is bigger), however this has been changed over time and now
+ 8Kb is sufficient (check NLMSG_DEFAULT_SIZE on Linux
+ linux/include/linux/netlink.h). */
+ const size_t buf_size = 8192;
+ char *buf = malloc (buf_size);
+ if (buf == NULL)
+ goto out_fail;
struct iovec iov = { buf, buf_size };
@@ -229,13 +217,11 @@ __netlink_request (struct netlink_handle *h, int type)
h->end_ptr = nlm_next;
}
- if (use_malloc)
- free (buf);
+ free(buf);
return 0;
out_fail:
- if (use_malloc)
- free (buf);
+ free(buf);
return -1;
}
@@ -324,6 +310,8 @@ getifaddrs_internal (struct ifaddrs **ifap)
char *ifa_data_ptr; /* Pointer to the unused part of memory for
ifa_data. */
int result = 0;
+ struct scratch_buffer buf;
+ scratch_buffer_init (&buf);
*ifap = NULL;
@@ -425,7 +413,12 @@ getifaddrs_internal (struct ifaddrs **ifap)
}
/* Table for mapping kernel index to entry in our list. */
- map_newlink_data = alloca (newlink * sizeof (int));
+ if (!scratch_buffer_set_array_size (&buf, 1, newlink * sizeof (int)))
+ {
+ result = -1;
+ goto exit_free;
+ }
+ map_newlink_data = buf.data;
memset (map_newlink_data, '\xff', newlink * sizeof (int));
ifa_data_ptr = (char *) &ifas[newlink + newaddr];
@@ -820,6 +813,7 @@ getifaddrs_internal (struct ifaddrs **ifap)
exit_free:
__netlink_free_handle (&nh);
__netlink_close (&nh);
+ scratch_buffer_free (&buf);
return result;
}
--
2.39.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ifaddrs: Get rid of alloca
2023-06-01 16:43 [PATCH v5] ifaddrs: Get rid of alloca Joe Simmons-Talbott
@ 2023-06-09 15:01 ` Joe Simmons-Talbott
2023-06-12 20:44 ` Adhemerval Zanella Netto
2023-06-21 19:14 ` Adhemerval Zanella Netto
2 siblings, 0 replies; 7+ messages in thread
From: Joe Simmons-Talbott @ 2023-06-09 15:01 UTC (permalink / raw)
To: libc-alpha
On Thu, Jun 01, 2023 at 12:43:26PM -0400, Joe Simmons-Talbott wrote:
> Use scratch_buffer and malloc rather than alloca to avoid potential stack
> overflows.
Ping.
Thanks,
Joe
> ---
> Changes to v4:
> * Don't use a cleanup handler.
>
> sysdeps/unix/sysv/linux/ifaddrs.c | 46 ++++++++++++++-----------------
> 1 file changed, 20 insertions(+), 26 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
> index 184ee224cb..a10e8d9292 100644
> --- a/sysdeps/unix/sysv/linux/ifaddrs.c
> +++ b/sysdeps/unix/sysv/linux/ifaddrs.c
> @@ -16,13 +16,13 @@
> License along with the GNU C Library; if not, see
> <https://www.gnu.org/licenses/>. */
>
> -#include <alloca.h>
> #include <assert.h>
> #include <errno.h>
> #include <ifaddrs.h>
> #include <net/if.h>
> #include <netinet/in.h>
> #include <netpacket/packet.h>
> +#include <scratch_buffer.h>
> #include <stdbool.h>
> #include <stdint.h>
> #include <stdlib.h>
> @@ -131,26 +131,14 @@ __netlink_request (struct netlink_handle *h, int type)
> ssize_t read_len;
> bool done = false;
>
> -#ifdef PAGE_SIZE
> - /* Help the compiler optimize out the malloc call if PAGE_SIZE
> - is constant and smaller or equal to PTHREAD_STACK_MIN/4. */
> - const size_t buf_size = PAGE_SIZE;
> -#else
> - const size_t buf_size = __getpagesize ();
> -#endif
> - bool use_malloc = false;
> - char *buf;
> -
> - if (__libc_use_alloca (buf_size))
> - buf = alloca (buf_size);
> - else
> - {
> - buf = malloc (buf_size);
> - if (buf != NULL)
> - use_malloc = true;
> - else
> - goto out_fail;
> - }
> + /* Netlink requires that user buffer needs to be either 8kb or page size
> + (whichever is bigger), however this has been changed over time and now
> + 8Kb is sufficient (check NLMSG_DEFAULT_SIZE on Linux
> + linux/include/linux/netlink.h). */
> + const size_t buf_size = 8192;
> + char *buf = malloc (buf_size);
> + if (buf == NULL)
> + goto out_fail;
>
> struct iovec iov = { buf, buf_size };
>
> @@ -229,13 +217,11 @@ __netlink_request (struct netlink_handle *h, int type)
> h->end_ptr = nlm_next;
> }
>
> - if (use_malloc)
> - free (buf);
> + free(buf);
> return 0;
>
> out_fail:
> - if (use_malloc)
> - free (buf);
> + free(buf);
> return -1;
> }
>
> @@ -324,6 +310,8 @@ getifaddrs_internal (struct ifaddrs **ifap)
> char *ifa_data_ptr; /* Pointer to the unused part of memory for
> ifa_data. */
> int result = 0;
> + struct scratch_buffer buf;
> + scratch_buffer_init (&buf);
>
> *ifap = NULL;
>
> @@ -425,7 +413,12 @@ getifaddrs_internal (struct ifaddrs **ifap)
> }
>
> /* Table for mapping kernel index to entry in our list. */
> - map_newlink_data = alloca (newlink * sizeof (int));
> + if (!scratch_buffer_set_array_size (&buf, 1, newlink * sizeof (int)))
> + {
> + result = -1;
> + goto exit_free;
> + }
> + map_newlink_data = buf.data;
> memset (map_newlink_data, '\xff', newlink * sizeof (int));
>
> ifa_data_ptr = (char *) &ifas[newlink + newaddr];
> @@ -820,6 +813,7 @@ getifaddrs_internal (struct ifaddrs **ifap)
> exit_free:
> __netlink_free_handle (&nh);
> __netlink_close (&nh);
> + scratch_buffer_free (&buf);
>
> return result;
> }
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ifaddrs: Get rid of alloca
2023-06-01 16:43 [PATCH v5] ifaddrs: Get rid of alloca Joe Simmons-Talbott
2023-06-09 15:01 ` Joe Simmons-Talbott
@ 2023-06-12 20:44 ` Adhemerval Zanella Netto
2023-06-14 19:20 ` Joe Simmons-Talbott
2023-06-21 19:14 ` Adhemerval Zanella Netto
2 siblings, 1 reply; 7+ messages in thread
From: Adhemerval Zanella Netto @ 2023-06-12 20:44 UTC (permalink / raw)
To: Joe Simmons-Talbott, libc-alpha
On 01/06/23 13:43, Joe Simmons-Talbott via Libc-alpha wrote:
> Use scratch_buffer and malloc rather than alloca to avoid potential stack
> overflows.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> Changes to v4:
> * Don't use a cleanup handler.
>
> sysdeps/unix/sysv/linux/ifaddrs.c | 46 ++++++++++++++-----------------
> 1 file changed, 20 insertions(+), 26 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
> index 184ee224cb..a10e8d9292 100644
> --- a/sysdeps/unix/sysv/linux/ifaddrs.c
> +++ b/sysdeps/unix/sysv/linux/ifaddrs.c
> @@ -16,13 +16,13 @@
> License along with the GNU C Library; if not, see
> <https://www.gnu.org/licenses/>. */
>
> -#include <alloca.h>
> #include <assert.h>
> #include <errno.h>
> #include <ifaddrs.h>
> #include <net/if.h>
> #include <netinet/in.h>
> #include <netpacket/packet.h>
> +#include <scratch_buffer.h>
> #include <stdbool.h>
> #include <stdint.h>
> #include <stdlib.h>
> @@ -131,26 +131,14 @@ __netlink_request (struct netlink_handle *h, int type)
> ssize_t read_len;
> bool done = false;
>
> -#ifdef PAGE_SIZE
> - /* Help the compiler optimize out the malloc call if PAGE_SIZE
> - is constant and smaller or equal to PTHREAD_STACK_MIN/4. */
> - const size_t buf_size = PAGE_SIZE;
> -#else
> - const size_t buf_size = __getpagesize ();
> -#endif
> - bool use_malloc = false;
> - char *buf;
> -
> - if (__libc_use_alloca (buf_size))
> - buf = alloca (buf_size);
> - else
> - {
> - buf = malloc (buf_size);
> - if (buf != NULL)
> - use_malloc = true;
> - else
> - goto out_fail;
> - }
> + /* Netlink requires that user buffer needs to be either 8kb or page size
> + (whichever is bigger), however this has been changed over time and now
> + 8Kb is sufficient (check NLMSG_DEFAULT_SIZE on Linux
> + linux/include/linux/netlink.h). */
> + const size_t buf_size = 8192;
> + char *buf = malloc (buf_size);
> + if (buf == NULL)
> + goto out_fail;
>
> struct iovec iov = { buf, buf_size };
>
> @@ -229,13 +217,11 @@ __netlink_request (struct netlink_handle *h, int type)
> h->end_ptr = nlm_next;
> }
>
> - if (use_malloc)
> - free (buf);
> + free(buf);
> return 0;
>
> out_fail:
> - if (use_malloc)
> - free (buf);
> + free(buf);
> return -1;
> }
>
> @@ -324,6 +310,8 @@ getifaddrs_internal (struct ifaddrs **ifap)
> char *ifa_data_ptr; /* Pointer to the unused part of memory for
> ifa_data. */
> int result = 0;
> + struct scratch_buffer buf;
> + scratch_buffer_init (&buf);
>
> *ifap = NULL;
>
> @@ -425,7 +413,12 @@ getifaddrs_internal (struct ifaddrs **ifap)
> }
>
> /* Table for mapping kernel index to entry in our list. */
> - map_newlink_data = alloca (newlink * sizeof (int));
> + if (!scratch_buffer_set_array_size (&buf, 1, newlink * sizeof (int)))
> + {
> + result = -1;
> + goto exit_free;
> + }
> + map_newlink_data = buf.data;
> memset (map_newlink_data, '\xff', newlink * sizeof (int));
>
> ifa_data_ptr = (char *) &ifas[newlink + newaddr];
> @@ -820,6 +813,7 @@ getifaddrs_internal (struct ifaddrs **ifap)
> exit_free:
> __netlink_free_handle (&nh);
> __netlink_close (&nh);
> + scratch_buffer_free (&buf);
>
> return result;
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ifaddrs: Get rid of alloca
2023-06-12 20:44 ` Adhemerval Zanella Netto
@ 2023-06-14 19:20 ` Joe Simmons-Talbott
2023-06-21 17:17 ` Joe Simmons-Talbott
0 siblings, 1 reply; 7+ messages in thread
From: Joe Simmons-Talbott @ 2023-06-14 19:20 UTC (permalink / raw)
To: Adhemerval Zanella Netto; +Cc: libc-alpha
On Mon, Jun 12, 2023 at 05:44:19PM -0300, Adhemerval Zanella Netto wrote:
>
>
> On 01/06/23 13:43, Joe Simmons-Talbott via Libc-alpha wrote:
> > Use scratch_buffer and malloc rather than alloca to avoid potential stack
> > overflows.
>
> LGTM, thanks.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Thanks for the review. Would you mind pushing this please?
Thanks,
Joe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ifaddrs: Get rid of alloca
2023-06-14 19:20 ` Joe Simmons-Talbott
@ 2023-06-21 17:17 ` Joe Simmons-Talbott
0 siblings, 0 replies; 7+ messages in thread
From: Joe Simmons-Talbott @ 2023-06-21 17:17 UTC (permalink / raw)
To: Adhemerval Zanella Netto, libc-alpha
On Wed, Jun 14, 2023 at 03:20:29PM -0400, Joe Simmons-Talbott via Libc-alpha wrote:
> On Mon, Jun 12, 2023 at 05:44:19PM -0300, Adhemerval Zanella Netto wrote:
> >
> >
> > On 01/06/23 13:43, Joe Simmons-Talbott via Libc-alpha wrote:
> > > Use scratch_buffer and malloc rather than alloca to avoid potential stack
> > > overflows.
> >
> > LGTM, thanks.
> >
> > Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
> Thanks for the review. Would you mind pushing this please?
>
Ping.
Thanks,
Joe
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ifaddrs: Get rid of alloca
2023-06-01 16:43 [PATCH v5] ifaddrs: Get rid of alloca Joe Simmons-Talbott
2023-06-09 15:01 ` Joe Simmons-Talbott
2023-06-12 20:44 ` Adhemerval Zanella Netto
@ 2023-06-21 19:14 ` Adhemerval Zanella Netto
2023-06-21 20:04 ` Joe Simmons-Talbott
2 siblings, 1 reply; 7+ messages in thread
From: Adhemerval Zanella Netto @ 2023-06-21 19:14 UTC (permalink / raw)
To: Joe Simmons-Talbott, libc-alpha
On 01/06/23 13:43, Joe Simmons-Talbott via Libc-alpha wrote:
> Use scratch_buffer and malloc rather than alloca to avoid potential stack
> overflows.
> ---
> Changes to v4:
> * Don't use a cleanup handler.
>
> sysdeps/unix/sysv/linux/ifaddrs.c | 46 ++++++++++++++-----------------
> 1 file changed, 20 insertions(+), 26 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
> index 184ee224cb..a10e8d9292 100644
> --- a/sysdeps/unix/sysv/linux/ifaddrs.c
> +++ b/sysdeps/unix/sysv/linux/ifaddrs.c
> @@ -16,13 +16,13 @@
> License along with the GNU C Library; if not, see
> <https://www.gnu.org/licenses/>. */
>
> -#include <alloca.h>
> #include <assert.h>
> #include <errno.h>
> #include <ifaddrs.h>
> #include <net/if.h>
> #include <netinet/in.h>
> #include <netpacket/packet.h>
> +#include <scratch_buffer.h>
> #include <stdbool.h>
> #include <stdint.h>
> #include <stdlib.h>
> @@ -131,26 +131,14 @@ __netlink_request (struct netlink_handle *h, int type)
> ssize_t read_len;
> bool done = false;
>
> -#ifdef PAGE_SIZE
> - /* Help the compiler optimize out the malloc call if PAGE_SIZE
> - is constant and smaller or equal to PTHREAD_STACK_MIN/4. */
> - const size_t buf_size = PAGE_SIZE;
> -#else
> - const size_t buf_size = __getpagesize ();
> -#endif
> - bool use_malloc = false;
> - char *buf;
> -
> - if (__libc_use_alloca (buf_size))
> - buf = alloca (buf_size);
> - else
> - {
> - buf = malloc (buf_size);
> - if (buf != NULL)
> - use_malloc = true;
> - else
> - goto out_fail;
> - }
> + /* Netlink requires that user buffer needs to be either 8kb or page size
> + (whichever is bigger), however this has been changed over time and now
> + 8Kb is sufficient (check NLMSG_DEFAULT_SIZE on Linux
> + linux/include/linux/netlink.h). */
> + const size_t buf_size = 8192;
> + char *buf = malloc (buf_size);
> + if (buf == NULL)
> + goto out_fail;
>
> struct iovec iov = { buf, buf_size };
>
> @@ -229,13 +217,11 @@ __netlink_request (struct netlink_handle *h, int type)
> h->end_ptr = nlm_next;
> }
>
> - if (use_malloc)
> - free (buf);
> + free(buf);
> return 0;
>
> out_fail:
> - if (use_malloc)
> - free (buf);
> + free(buf);
> return -1;
> }
>
> @@ -324,6 +310,8 @@ getifaddrs_internal (struct ifaddrs **ifap)
> char *ifa_data_ptr; /* Pointer to the unused part of memory for
> ifa_data. */
> int result = 0;
> + struct scratch_buffer buf;
> + scratch_buffer_init (&buf);
>
> *ifap = NULL;
>
> @@ -425,7 +413,12 @@ getifaddrs_internal (struct ifaddrs **ifap)
> }
>
> /* Table for mapping kernel index to entry in our list. */
> - map_newlink_data = alloca (newlink * sizeof (int));
> + if (!scratch_buffer_set_array_size (&buf, 1, newlink * sizeof (int)))
I just realized that this defeats the overflow checks done by
__libc_scratch_buffer_set_array_size. The correct usage is as:
if (!scratch_buffer_set_array_size (&buf, newlink, sizeof (int)))
[...]
Could you please send a new version so Siddhesh STATS script do not
scream at us?
> + {
> + result = -1;
> + goto exit_free;
> + }
> + map_newlink_data = buf.data;
> memset (map_newlink_data, '\xff', newlink * sizeof (int));
>
> ifa_data_ptr = (char *) &ifas[newlink + newaddr];
> @@ -820,6 +813,7 @@ getifaddrs_internal (struct ifaddrs **ifap)
> exit_free:
> __netlink_free_handle (&nh);
> __netlink_close (&nh);
> + scratch_buffer_free (&buf);
>
> return result;
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5] ifaddrs: Get rid of alloca
2023-06-21 19:14 ` Adhemerval Zanella Netto
@ 2023-06-21 20:04 ` Joe Simmons-Talbott
0 siblings, 0 replies; 7+ messages in thread
From: Joe Simmons-Talbott @ 2023-06-21 20:04 UTC (permalink / raw)
To: Adhemerval Zanella Netto; +Cc: libc-alpha
On Wed, Jun 21, 2023 at 04:14:11PM -0300, Adhemerval Zanella Netto wrote:
>
>
> On 01/06/23 13:43, Joe Simmons-Talbott via Libc-alpha wrote:
> > Use scratch_buffer and malloc rather than alloca to avoid potential stack
> > overflows.
> > ---
> > Changes to v4:
> > * Don't use a cleanup handler.
> >
> > sysdeps/unix/sysv/linux/ifaddrs.c | 46 ++++++++++++++-----------------
> > 1 file changed, 20 insertions(+), 26 deletions(-)
> >
> > diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
> > index 184ee224cb..a10e8d9292 100644
> > --- a/sysdeps/unix/sysv/linux/ifaddrs.c
> > +++ b/sysdeps/unix/sysv/linux/ifaddrs.c
> > @@ -16,13 +16,13 @@
> > License along with the GNU C Library; if not, see
> > <https://www.gnu.org/licenses/>. */
> >
> > -#include <alloca.h>
> > #include <assert.h>
> > #include <errno.h>
> > #include <ifaddrs.h>
> > #include <net/if.h>
> > #include <netinet/in.h>
> > #include <netpacket/packet.h>
> > +#include <scratch_buffer.h>
> > #include <stdbool.h>
> > #include <stdint.h>
> > #include <stdlib.h>
> > @@ -131,26 +131,14 @@ __netlink_request (struct netlink_handle *h, int type)
> > ssize_t read_len;
> > bool done = false;
> >
> > -#ifdef PAGE_SIZE
> > - /* Help the compiler optimize out the malloc call if PAGE_SIZE
> > - is constant and smaller or equal to PTHREAD_STACK_MIN/4. */
> > - const size_t buf_size = PAGE_SIZE;
> > -#else
> > - const size_t buf_size = __getpagesize ();
> > -#endif
> > - bool use_malloc = false;
> > - char *buf;
> > -
> > - if (__libc_use_alloca (buf_size))
> > - buf = alloca (buf_size);
> > - else
> > - {
> > - buf = malloc (buf_size);
> > - if (buf != NULL)
> > - use_malloc = true;
> > - else
> > - goto out_fail;
> > - }
> > + /* Netlink requires that user buffer needs to be either 8kb or page size
> > + (whichever is bigger), however this has been changed over time and now
> > + 8Kb is sufficient (check NLMSG_DEFAULT_SIZE on Linux
> > + linux/include/linux/netlink.h). */
> > + const size_t buf_size = 8192;
> > + char *buf = malloc (buf_size);
> > + if (buf == NULL)
> > + goto out_fail;
> >
> > struct iovec iov = { buf, buf_size };
> >
> > @@ -229,13 +217,11 @@ __netlink_request (struct netlink_handle *h, int type)
> > h->end_ptr = nlm_next;
> > }
> >
> > - if (use_malloc)
> > - free (buf);
> > + free(buf);
> > return 0;
> >
> > out_fail:
> > - if (use_malloc)
> > - free (buf);
> > + free(buf);
> > return -1;
> > }
> >
> > @@ -324,6 +310,8 @@ getifaddrs_internal (struct ifaddrs **ifap)
> > char *ifa_data_ptr; /* Pointer to the unused part of memory for
> > ifa_data. */
> > int result = 0;
> > + struct scratch_buffer buf;
> > + scratch_buffer_init (&buf);
> >
> > *ifap = NULL;
> >
> > @@ -425,7 +413,12 @@ getifaddrs_internal (struct ifaddrs **ifap)
> > }
> >
> > /* Table for mapping kernel index to entry in our list. */
> > - map_newlink_data = alloca (newlink * sizeof (int));
> > + if (!scratch_buffer_set_array_size (&buf, 1, newlink * sizeof (int)))
>
> I just realized that this defeats the overflow checks done by
> __libc_scratch_buffer_set_array_size. The correct usage is as:
>
> if (!scratch_buffer_set_array_size (&buf, newlink, sizeof (int)))
> [...]
>
> Could you please send a new version so Siddhesh STATS script do not
> scream at us?
I've sent a v6 with this fix. Thanks for catching it.
Thanks,
Joe
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-06-21 20:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01 16:43 [PATCH v5] ifaddrs: Get rid of alloca Joe Simmons-Talbott
2023-06-09 15:01 ` Joe Simmons-Talbott
2023-06-12 20:44 ` Adhemerval Zanella Netto
2023-06-14 19:20 ` Joe Simmons-Talbott
2023-06-21 17:17 ` Joe Simmons-Talbott
2023-06-21 19:14 ` Adhemerval Zanella Netto
2023-06-21 20:04 ` Joe Simmons-Talbott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).