Files
qmic/tests/bad_octal.qmi
Alex Elder de50c02678 parser: don't treat 8 as a valid octal digit
The function isodigit() was defined to mimic isxdigit(), indicating
whether a given character was an octal digit.  But as written, it
considers '8' to be a valid octal digit, which it is not.  Fix this
bug.

In addition, the "bad_octal.qmi" test file refers to an undefined
"test_struct" as a message member type.  Fix that by using u32
instead.

Fixes: 61f6fe9 ("parser: be more restrictive when parsing numbers")
Signed-off-by: Alex Elder <elder@linaro.org>
2021-10-08 17:01:32 -05:00

20 lines
296 B
Plaintext

package test;
struct qmi_result {
u16 result;
u16 error;
};
request test_request {
# Note that '8' is not a valid octal digit
optional u32 foo = 028;
} = 0x23;
response test_response {
required qmi_result r = 2;
} = 043;
indication test_indication {
optional u64 value = 0x99;
} = 0x7;