[OpenSIPS-Devel] [OpenSIPS/opensips] fb8fba: rest_client: Remove extra check

Liviu Chircu noreply at github.com
Wed Nov 17 13:25:47 EST 2021


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: fb8fbafc0187e657049a85eb722bf55da6808169
      https://github.com/OpenSIPS/opensips/commit/fb8fbafc0187e657049a85eb722bf55da6808169
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2021-11-17 (Wed, 17 Nov 2021)

  Changed paths:
    M modules/rest_client/rest_cb.c

  Log Message:
  -----------
  rest_client: Remove extra check

Since "size_t" is an unsigned integer type, the RHS multiplication
result cannot be negative unless an overflow occurs when assigning to
LHS.  So we change the type of "len" to unsigned as well, to prevent
this corner-case.





More information about the Devel mailing list