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

Fix various overflows and UB in src/ #7494

Closed
wants to merge 3 commits into from

Commits on Jun 30, 2016

  1. buffer: fix unintended unsigned overflow

    `offset` is user supplied variable and may be bigger than
    `ts_obj_length`. There is no need to subtract them and pass along, so
    just throw when the subtraction result would overflow.
    indutny committed Jun 30, 2016
    Configuration menu
    Copy the full SHA
    f5ca5a0 View commit details
    Browse the repository at this point in the history
  2. crypto: fix undefined behavior in ParseExtension

    Many extensions are unknown to the `ClientHelloParser::ParseExtension`,
    do not cast user-supplied `uint16_t` to `enum`.
    indutny committed Jun 30, 2016
    Configuration menu
    Copy the full SHA
    05d0321 View commit details
    Browse the repository at this point in the history
  3. string_search: fix various overflows

    Before values are subtracted in C/C++ they are cast to a common type
    which depends on the types of lhs and rhs. Usually this means casting to
    a bigger type, and if the sizes are the same - casting to unsigned.
    indutny committed Jun 30, 2016
    Configuration menu
    Copy the full SHA
    27bfdc5 View commit details
    Browse the repository at this point in the history