1
0
Fork 0
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:
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

@ -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;