BUG/MINOR: activity: use the new pointer to calculate the new size in realloc()
authorWilly Tarreau <w@1wt.eu>
Fri, 7 May 2021 06:01:35 +0000 (08:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 7 May 2021 06:01:35 +0000 (08:01 +0200)
commit2639e2edc2cdc0546a83291e553c7423517f0a67
treed7dba8afd5efdefbcb9d1ca0c0d0866eb80b652e
parent0b7c78aa054db909c25563aed77c75313e87d411
BUG/MINOR: activity: use the new pointer to calculate the new size in realloc()

When memory profiling is enabled, realloc() can occasionally get the area
size wrong due to the wrong pointer being used to check the new size. When
the old area gets unmapped in the operation, this may even result in a
crash. There's no impact without memory profiling though.

No backport is needed as this is exclusively 2.4-dev.
src/activity.c