HomeFreeBSD

ng_parse: disallow negative length for malloc

Description

ng_parse: disallow negative length for malloc

This is an interim robustness improvement; further improvements as
described in the PR and/or Phabricator review are still needed.

PR: 267334
Reported by: Robert Morris <rtm@lcs.mit.edu>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37229

(cherry picked from commit ae4f39464c61182c2bdfd3cc61594f8707b3daf0)
(cherry picked from commit 0e0329c6dbabc12f5ab08bb63929a2ba6d506084)

Details

Provenance
emasteAuthored on Nov 1 2022, 2:01 PM
Differential Revision
D37229: ng_parse: disallow negative length for malloc
Parents
rG17c0ecb14df1: Merge commit cf721e29c6a3 from llvm git (by Amy Kwan):
Branches
Unknown
Tags
Unknown