From: Joseph Sutton Date: Wed, 20 Sep 2023 05:05:34 +0000 (+1200) Subject: s3:rpc_server: Initialize ‘tm’ structure X-Git-Tag: tevent-0.16.0~359 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c278a1d3e1c80d4b5b39b09d6a742601b9534f2b;p=thirdparty%2Fsamba.git s3:rpc_server: Initialize ‘tm’ structure ‘tm’ must be initialized prior to calling strptime(). Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source3/rpc_server/mdssvc/es_parser.y b/source3/rpc_server/mdssvc/es_parser.y index c154dd660fc..3fbdf93ec75 100644 --- a/source3/rpc_server/mdssvc/es_parser.y +++ b/source3/rpc_server/mdssvc/es_parser.y @@ -259,7 +259,7 @@ DATE_ISO OBRACE WORD CBRACE { static char *isodate_to_sldate(const char *isodate) { struct es_parser_state *s = global_es_parser_state; - struct tm tm; + struct tm tm = {}; const char *p = NULL; char *tstr = NULL; time_t t; diff --git a/source3/rpc_server/mdssvc/sparql_parser.y b/source3/rpc_server/mdssvc/sparql_parser.y index 2be99cebda0..68d4d870eb6 100644 --- a/source3/rpc_server/mdssvc/sparql_parser.y +++ b/source3/rpc_server/mdssvc/sparql_parser.y @@ -196,7 +196,7 @@ DATE_ISO OBRACE WORD CBRACE {$$ = isodate2unix($3);} static time_t isodate2unix(const char *s) { - struct tm tm; + struct tm tm = {}; const char *p; p = strptime(s, "%Y-%m-%dT%H:%M:%SZ", &tm);