1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-11 22:23:24 +00:00

Fixed possible crash or fail of option ip-add-membership with two parameters

This commit is contained in:
Gerhard Rieger 2025-01-16 08:00:05 +01:00
parent bcca5a3b9a
commit 920ed1f0a3
7 changed files with 30 additions and 4 deletions

View file

@ -2768,7 +2768,8 @@ int parseopts_table(const char **a, groups_t groups, struct opt **opts,
++i;
if ((i % 8) == 0) {
*opts = Realloc(*opts, (i+8) * sizeof(struct opt));
/*0 *opts = Realloc(*opts, (i+8) * sizeof(struct opt)); */
*opts = Realloc3(*opts, (i+8) * sizeof(struct opt), i * sizeof(struct opt));
if (*opts == NULL) {
return -1;
}