maint: Update NEWS and run 'make indent'.

* NEWS: Mention the AddressSanitizer error fixed by the previous
commit.
* ifconfig/printif.c (print_interfaceX): Run 'make indent' to satisfy
syntax-check.
This commit is contained in:
Collin Funk
2024-05-07 02:09:03 -07:00
parent 45d5900c9e
commit cd3a8b26fb
2 changed files with 13 additions and 9 deletions

4
NEWS
View File

@@ -13,6 +13,10 @@ https://lists.gnu.org/archive/html/bug-inetutils/2024-03/msg00000.html
** ifconfig: With -A, reject invalid prefix length specifications, and
correctly handle a prefix length of 0.
** ifconfig: Fix a 'dynamic-stack-buffer-overflow' detected by AddressSanitizer
when using the --format or --short option. More details in
<https://lists.gnu.org/archive/html/bug-inetutils/2024-05/msg00020.html>.
* Noteworthy changes in release 2.5 (2023-12-29) [stable]
** ftpd, rcp, rlogin, rsh, rshd, uucpd

View File

@@ -1133,7 +1133,7 @@ print_interfaceX (format_data_t form, int quiet)
form->format = p;
print_interfaceX (form, 1);
q = form->format;
argv = xrealloc (argv, (argc + 1) * sizeof (char *));
argv = xrealloc (argv, (argc + 1) * sizeof (char *));
argv[argc] = xmalloc (q - p + 1);
memcpy (argv[argc], p, q - p);
argv[argc][q - p] = '\0';
@@ -1144,14 +1144,14 @@ print_interfaceX (format_data_t form, int quiet)
}
format_handler (id, form, argc, argv);
if (argv != NULL)
{
/* Clean up. */
while (--argc >= 0)
free (argv[argc]);
free (argv);
}
form->format = p;
if (argv != NULL)
{
/* Clean up. */
while (--argc >= 0)
free (argv[argc]);
free (argv);
}
form->format = p;
}
}
}