feb2446 resolve: fix heap-buffer-overflow reported by ASAN with strict_string_checks=1

1 file Authored by Yu Watanabe 2 years ago, Committed by zbyszek 2 years ago,
    resolve: fix heap-buffer-overflow reported by ASAN with strict_string_checks=1
    
    Fixes #23942.
    
    (cherry picked from commit beeab352de413e1c04de0a67ee36525fcf6e99dd)