Thread (1 message) 1 message, 1 author, 2019-01-12

Re: [PATCH 1/6] get_super_prefix(): copy getenv() result

From: Junio C Hamano <hidden>
Date: 2019-01-12 03:02:50

Jeff King [off-list ref] writes:
The return value of getenv() is not guaranteed to remain valid across
multiple calls (nor across calls to setenv()). Since this function
caches the result for the length of the program, we must make a copy to
ensure that it is still valid when we need it.

Reported-by: Yngve N. Pettersen <redacted>
Signed-off-by: Jeff King <redacted>
---
Makes sense.  Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help