mirror of
https://github.com/linux-msm/qmic.git
synced 2024-11-23 09:44:06 +08:00
789c4e9d23
Define TOKEN_BUF_SIZE as the size of the buffer used when parsing tokens. Define TOKEN_BUF_MIN as the minimum size of the token buffer; the size comes from what's necessary to represent a maximal 64-bit octal value. Add checks in yylex() to avoid exhausting the token buffer on pathological input. Use the minimum buffer size to NUL-terminate the buffer for a message if the token name is too long. Signed-off-by: Alex Elder <elder@linaro.org> Message-Id: <20211001232338.769309-28-elder@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
19 lines
404 B
Plaintext
19 lines
404 B
Plaintext
package test_but_this_is_a_super_long_name_because_we_are_testing_parsing_a_token_that_is_bigger_than_the_size_of_the_input_buffer_its_very_very_bad_you_see;
|
|
|
|
struct qmi_result {
|
|
u16 result;
|
|
u16 error;
|
|
};
|
|
|
|
request test_request {
|
|
required u8 test_number = 0x12;
|
|
} = 0x23;
|
|
|
|
response test_response {
|
|
required qmi_result r = 2;
|
|
} = 043;
|
|
|
|
indication test_indication {
|
|
optional u64 value = 0x99;
|
|
} = 0x7;
|