Hi JP,

I have not seen co-authored-by tag used before.

If Dimitry is the author, then please update git commit so
Dimitry is the author and remove that tag.

Also, please make sure that names do not contain ','.

Should be: Dimity Kloper <dimitry.klo...@intel.com>

Thanks,

Mike

> -----Original Message-----
> From: Jayaprakash, N <n.jayaprak...@intel.com>
> Sent: Friday, July 21, 2023 8:27 AM
> To: devel@edk2.groups.io
> Cc: Jayaprakash, N <n.jayaprak...@intel.com>; Rebecca Cran
> <rebe...@nuviainc.com>; Kinney, Michael D <michael.d.kin...@intel.com>;
> Kloper; Kloper, Dimitry <dimitry.klo...@intel.com>
> Subject: [edk2-libc Patch 1/1] edk2-libc/StdLib: Uninitialized global
> variable
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4506
> 
> res_init() is called from different places in sockets library. It
> depends
> on global _res variable containing a state. The problem is that
> if __BIND_RES_TEXT macro is not defined, _res is not initialized.
> Depending on compiler and build optimization this can fill the
> variable with garbage that is later used by res_init().
> Fix is trivial - explicitly initialize _res.
> 
> Cc: Rebecca Cran <rebe...@nuviainc.com>
> Cc: Michael D Kinney <michael.d.kin...@intel.com>
> Co-authored-by: Kloper, Dimitry <dimitry.klo...@intel.com>
> Signed-off-by: Jayaprakash N <n.jayaprak...@intel.com>
> ---
>  StdLib/BsdSocketLib/res_init.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/StdLib/BsdSocketLib/res_init.c
> b/StdLib/BsdSocketLib/res_init.c
> index 613a76a..fbc53c5 100644
> --- a/StdLib/BsdSocketLib/res_init.c
> +++ b/StdLib/BsdSocketLib/res_init.c
> @@ -121,11 +121,11 @@ static u_int32_t net_mask __P((struct in_addr));
>   */
> 
>  struct __res_state _res
> -# if defined(__BIND_RES_TEXT)
> -    = { RES_TIMEOUT, }  /* Motorola, et al. */
> -# endif
> -    ;
> -
> +#if defined(__BIND_RES_TEXT)
> +    = { RES_TIMEOUT, };  /* Motorola, et al. */
> +#else
> +    = {0};
> +#endif
> 
>  /*
>   * Set up default settings.  If the configuration file exist, the
> values
> --
> 2.40.0.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107127): https://edk2.groups.io/g/devel/message/107127
Mute This Topic: https://groups.io/mt/100278658/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to