[VDPAU] [PATCH] Save the result from secure_getenv

Christian König christian.koenig at amd.com
Thu Feb 18 08:20:25 UTC 2016


Hi Zach,

your understanding is incorrect.

Rémi already explained it correctly that the result of secure_getenv() 
can only change when somebody modifies the environment of the process in 
another thread at the same time and that behavior is undefined with or 
without your patch.

So your patch actually doesn't help in any way.

Regards,
Christian.

Am 18.02.2016 um 01:27 schrieb Zach Angold:
> I think I might have miscommunicated what bug I was trying to address
> with this patch. Consider the following:
>
> x = secure_getenv("foo")
> y = secure_getenv("bar")
> print(x)
>
> In my understanding, the above pseudocode could print out either $foo
> or $bar, depending on whether the return value of getenv() is
> implemented to be statically allocated. What I'm trying to accomplish
> by replacing secure_getenv with safe_secure_getenv is to (for
> example) have the above print out $foo regardless of the
> implementation of secure_getenv.
>
>
>
> _______________________________________________
> VDPAU mailing list
> VDPAU at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/vdpau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/vdpau/attachments/20160218/ddc7f832/attachment.html>


More information about the VDPAU mailing list