mirror of
https://repo.or.cz/socat.git
synced 2025-07-09 13:46:33 +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
|
@ -84,7 +84,8 @@ static int xioopen_exec(
|
|||
while (*strp == ' ') {
|
||||
while (*++strp == ' ') ;
|
||||
if ((pargc & 0x07) == 0) {
|
||||
pargv = Realloc(pargv, (pargc+8)*sizeof(char *));
|
||||
/*0 pargv = Realloc(pargv, (pargc+8)*sizeof(char *)); */
|
||||
pargv = Realloc3(pargv, (pargc+8)*sizeof(char *), pargc*sizeof(char *));
|
||||
if (pargv == NULL) return STAT_RETRYLATER;
|
||||
}
|
||||
pargv[pargc++] = tokp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue