]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Additional tests
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 15 Sep 2021 14:33:27 +0000 (09:33 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 15 Sep 2021 14:33:27 +0000 (09:33 -0500)
src/tests/unit/protocols/radius/time_delta.txt

index 19d97df88ca13bf41fb9a9443c0a4a9de3fcc88b..97ae98c219c817559bd115dd2cd95d90dea0e8f2 100644 (file)
@@ -57,6 +57,16 @@ match Unit-TLV = { Delta-MSec-int16 = -32768 }
 attribute Unit-TLV.Delta-MSec-int16 = -32768
 match Unit-TLV.Delta-MSec-int16 = -32768
 
+# Regression test for broken signed promotion
+encode-pair Unit-TLV.Delta-MSec-int32 = -32768
+match fe 08 0a 06 ff ff 80 00
+
+decode-pair -
+match Unit-TLV = { Delta-MSec-int32 = -32768 }
+
+attribute Unit-TLV.Delta-MSec-int32 = -32768
+match Unit-TLV.Delta-MSec-int32 = -32768
+
 #
 #      Min/Max values & overflows
 #