Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CID 1547479: Integer handling issues (INTEGER_OVERFLOW) #58

Open
ni4 opened this issue Jul 28, 2024 · 0 comments
Open

CID 1547479: Integer handling issues (INTEGER_OVERFLOW) #58

ni4 opened this issue Jul 28, 2024 · 0 comments

Comments

@ni4
Copy link
Contributor

ni4 commented Jul 28, 2024

*** CID 1547479:  Integer handling issues  (INTEGER_OVERFLOW)
/src/libsexpp/src/sexp-input.cpp: 418 in sexp::sexp_input_stream_t::scan_simple_string()()
412          * before checking the other cases, so that a token may begin with ":",
413          * which would otherwise be treated as a verbatim string missing a length.
414          */
415         if (is_token_char(next_char) && !is_dec_digit(next_char)) {
416             scan_token(ss);
417         } else {
>>>     CID 1547479:  Integer handling issues  (INTEGER_OVERFLOW)
>>>     Expression "length", which is equal to 4294967295, where "sexp::sexp_char_defs_t::is_dec_digit(this->next_char) ? this->scan_decimal_string() : 4294967295U" is known to be equal to 4294967295, overflows the type that receives it, a signed integer 32 bits wide.
418             length = is_dec_digit(next_char) ? scan_decimal_string() :
419                                                std::numeric_limits<uint32_t>::max();
420     
421             switch (next_char) {
422             case '\"':
423                 scan_quoted_string(ss, length);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant