[OpenSIPS-Devel] [OpenSIPS/opensips] 996fef: parse_hname2(): Avoid left-shifting negative values

Liviu Chircu noreply at github.com
Mon Oct 18 21:23:27 EST 2021


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: 996fef9372cd52c27a5c60d28078c4867f756d8b
      https://github.com/OpenSIPS/opensips/commit/996fef9372cd52c27a5c60d28078c4867f756d8b
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2021-10-19 (Tue, 19 Oct 2021)

  Changed paths:
    M parser/parse_hname2.c

  Log Message:
  -----------
  parse_hname2(): Avoid left-shifting negative values

Theoretically, left/right shifting negative values is considered to be
undefined behavior in all C standards, so UBSan is correct to report
this issue.  In practice, most compilers will handle this condition in a
way that still keeps the code running correctly, so this patch is not
fixing an actual crash or vulnerability...

Fixes OSS-Fuzz#39811





More information about the Devel mailing list