fix #25579 : possible buffer overflow