Merge branch '2499-a-loc-record-with-a-invalid-direction-field-triggers-an-insist-v9_11' into 'v9_11'

Resolve "A LOC record with a invalid direction field triggers an INSIST"

See merge request isc-projects/bind9!4712
This commit is contained in:
Mark Andrews 2021-02-19 01:07:26 +00:00
commit e42577800b
4 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,6 @@
5586. [bug] An invalid direction field in a LOC record resulted in
an INSIST failure. [GL #2499]
--- 9.11.28 released ---
5562. [security] Fix off-by-one bug in ISC SPNEGO implementation.

View file

@ -65,7 +65,8 @@
<itemizedlist>
<listitem>
<para>
None.
An invalid direction field (not one of 'N'/'S' or 'E'/'W')
in a LOC record triggered an INSIST failure. [GL #2499]
</para>
</listitem>
</itemizedlist>

View file

@ -242,7 +242,7 @@ loc_getcoordinate(isc_lex_t *lexer, unsigned long *dp, unsigned long *mp,
* Direction.
*/
RETERR(get_direction(lexer, &token, directions, &direction));
if (direction == -1) {
if (direction == 0) {
RETERR(DNS_R_SYNTAX);
}
done:

View file

@ -2120,6 +2120,7 @@ loc(void **state) {
TEXT_INVALID("90 0 1 S 180 W 0"),
TEXT_INVALID("90 S 180 1 W 0"),
TEXT_INVALID("90 S 180 0 1 W 0"),
TEXT_INVALID("0 0 0.000 E 0 0 0.000 E -0.95m 1m 10000m 10m"),
TEXT_VALID("0 0 0.000 N 0 0 0.000 E -0.95m 1m 10000m 10m"),
TEXT_VALID("0 0 0.000 N 0 0 0.000 E -0.05m 1m 10000m 10m"),
TEXT_VALID("0 0 0.000 N 0 0 0.000 E -100000.00m 1m 10000m 10m"),