Files
nearby/internal/platform/implementation/apple/Mediums/WiFiCommon
hai007 46ad9a75ef Fix out-of-bounds string access in GNCIPv4AddressTest found by LibC++ hardening
LibC++ hardening detected an out-of-bounds write in `testInitFromDataWithLeadingEmptyBytes`. The `std::string` initialized with "\0\0\0\0" was empty, making the access `addressString[3]` invalid.

Updated the `std::string` constructor to specify the size, so it correctly includes the null bytes, preventing the crash.

PiperOrigin-RevId: 846853226
2025-12-19 13:48:53 -08:00
..