f2a2cf5 CryptoPkg/Crt: import "inet_pton.c" (CVE-2019-14553)

Authored and Committed by lersek 4 years ago
    CryptoPkg/Crt: import "inet_pton.c" (CVE-2019-14553)
    
    For TianoCore BZ#1734, StdLib has been moved from the edk2 project to the
    edk2-libc project, in commit 964f432b9b0a ("edk2: Remove AppPkg, StdLib,
    StdLibPrivateInternalFiles", 2019-04-29).
    
    We'd like to use the inet_pton() function in CryptoPkg. Resurrect the
    "inet_pton.c" file from just before the StdLib removal, as follows:
    
      $ git show \
          964f432b9b0a^:StdLib/BsdSocketLib/inet_pton.c \
          > CryptoPkg/Library/BaseCryptLib/SysCall/inet_pton.c
    
    The inet_pton() function is only intended for the DXE phase at this time,
    therefore only the "BaseCryptLib" instance INF file receives the new file.
    
    Cc: David Woodhouse <dwmw2@infradead.org>
    Cc: Jian J Wang <jian.j.wang@intel.com>
    Cc: Jiaxin Wu <jiaxin.wu@intel.com>
    Cc: Sivaraman Nainar <sivaramann@amiindia.co.in>
    Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
    Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=960
    CVE: CVE-2019-14553
    Signed-off-by: Laszlo Ersek <lersek@redhat.com>