Size constraints for H225_ArrayOf_EnumeratedParameter

Discussion related to implementation and use of the H.323 Plus H.323 stack at http://www.h323plus.org.
Post Reply
d.kochmashev
Posts: 4
Joined: Tue Aug 25, 2009 7:34 am
Location: Ekaterinburg, Russia

Size constraints for H225_ArrayOf_EnumeratedParameter

Post by d.kochmashev » Mon Oct 23, 2017 7:03 am

Hello!

I have encountered something which looks like a bug. When I add parameters to my custom H460_Feature via
H460_FeatureTable table;

table.AddParameter(id, content);

SetCurrentTable(table);

H323Plus produces malformed packet with incorrectly encoded size of H225_ArrayOf_EnumeratedParameter. I’ve found that size constraints for H225_ArrayOf_EnumeratedParameter are not beeing set, however, according to spec, they had to be set. So, if my conclusion is right, I propose a small patch like the following:

--- h225_2.cxx.orig 2013-07-23 00:26:59.000000000 +0600
+++ h225_2.cxx 2017-10-23 11:00:27.000000000 +0500
@@ -19,6 +19,7 @@
H225_ArrayOf_EnumeratedParameter::H225_ArrayOf_EnumeratedParameter(unsigned tag, PASN_Object::TagClass tagClass)
: PASN_Array(tag, tagClass)
{
+ SetConstraintBounds(PASN_Object::FixedConstraint, 1, 512);
}

User avatar
paulej
Posts: 522
Joined: Sun Aug 23, 2009 7:32 pm
Location: Research Triangle Park, NC, USA
Contact:

Re: Size constraints for H225_ArrayOf_EnumeratedParameter

Post by paulej » Tue Oct 31, 2017 2:11 pm

For those who might come by looking for a follow-up, the discussion on this one is taking place on the mailing list here:
https://lists.packetizer.com/pipermail/ ... 05189.html

Post Reply