On Fri, Oct 2, 2020 at 12:38 PM Dumitrescu, Cristian <[email protected]> wrote: > > -----Original Message----- > > From: David Marchand <[email protected]> > > Sent: Friday, October 2, 2020 9:29 AM > > To: [email protected] > > Cc: Dumitrescu, Cristian <[email protected]> > > Subject: [PATCH] pipeline: fix build with glibc < 2.26 > > > > reallocarray has been introduced in glibc 2.26 but we still support > > glibc >= 2.7. > > Simply replace with realloc, as the considered sizes are unlikely to > > overflow. > > > > """ > > The reallocarray() function changes the size of the memory block > > pointed to by ptr to be large enough for an array of nmemb elements, > > each of which is size bytes. It is equivalent to the call > > > > realloc(ptr, nmemb * size); > > > > However, unlike that realloc() call, reallocarray() fails safely in > > the case where the multiplication would overflow. If such an over‐ > > flow occurs, reallocarray() returns NULL, sets errno to ENOMEM, and > > leaves the original block of memory unchanged. > > """ > > > > Fixes: 3ca60ceed79a ("pipeline: add SWX pipeline specification file") > > > > Signed-off-by: David Marchand <[email protected]> > Acked-by: Cristian Dumitrescu <[email protected]>
Applied. -- David Marchand

