Skip to content

Commit

Permalink
Fix meridian type in getdate.y
Browse files Browse the repository at this point in the history
Commit d3356bc (ticket 8927)
incorrectly tagged tMERIDIAN as <Number>.  So while the lexer assigns
meridian values to the Meridian union field, the parser erroneously
reads them from the Number field.  On 64-bit IBM zSystems (s390x),
this can result in using the most recently read number as a meridian
value, leading to an abort in ToSeconds().

Fix the tMERIDIAN token type to be <Meridian>.

[ghudson@mit.edu: edited commit message]

(cherry picked from commit 0108d7d)

ticket: 9087
version_fixed: 1.20.2
  • Loading branch information
jrisc authored and greghudson committed Jul 6, 2023
1 parent 81a2265 commit 5c2f26a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/kadmin/cli/getdate.y
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ static time_t yyRelSeconds;

%token tAGO tID tDST tNEVER
%token <Number> tDAY tDAYZONE tMINUTE_UNIT tMONTH tMONTH_UNIT
%token <Number> tSEC_UNIT tSNUMBER tUNUMBER tZONE tMERIDIAN
%token <Number> tSEC_UNIT tSNUMBER tUNUMBER tZONE
%token <Meridian> tMERIDIAN
%type <Meridian> o_merid

%%
Expand Down

0 comments on commit 5c2f26a

Please sign in to comment.