On Tue Nov 7 13:09:06 2023 +0000, eric pouech wrote:
I don't agree. It shows that the memory hasn't been (re)allocated elsewhere, so that keeping the pointer around is valid across putenv calls. and we need also to ensure string content hasn't been changed. for clarity I'll add the same test for getenv()which behaves the same way
In order to check that string content didn't change you will need to copy the buffer earlier. Calling strcmp(ptr, ptr) doesn't make sense.