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:
parent
bcca5a3b9a
commit
920ed1f0a3
7 changed files with 30 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue