osmo-mgw/tests/mgcp
Neels Hofmeyr 5336f57f05 fix mgcp_verify_ci(): off-by-one in max len check
MGCP_CONN_ID_MAXLEN actually includes a terminating nul, so we need to compare
strlen() against MGCP_CONN_ID_MAXLEN-1.

Log the length if it is too long.

Add MDCX_TOO_LONG_CI test to mgcp_test.c, testing a conn id of 33 characters.
Before this patch, the test returns error code 515 meaning "not found", while
now it returns 510 meaning "invalid", showing the off-by-one. Same is
illustrated by the error log ("not found" before, "too long" now), but the
error log is not verified by mgcp_test.c.

Change-Id: I8d6cc96be252bb486e94f343a8c7cae641ff9429
2018-09-03 23:08:08 +02:00
..
Makefile.am Turn libosmo-mgcp into local, non-installed library 2018-02-05 22:41:32 +00:00
mgcp_test.c fix mgcp_verify_ci(): off-by-one in max len check 2018-09-03 23:08:08 +02:00
mgcp_test.ok fix mgcp_verify_ci(): off-by-one in max len check 2018-09-03 23:08:08 +02:00