Follow-up Comment #2, bug #54126 (project wget): [comment #1 comment #1:] > Seems like this only occurs under Windows, which makes it slightly problematic when reproducing.
Yes, Linux uses USE_NLS_PROGRESS_BAR in the function cols_to_byte() we see while (p_cols <cols && _mbi_avail_ _(iter) ) { ..... if (p_cols> cols) { p_cols - = mb_width (mbc); break; } ..... } when USE_NLS_PROGRESS_BAR is undefined cols_to_byte returns cols regardless length of the remainder of the string _(mbi_avail (iter))_ This is the reason for repeating the last letter. I think crash and freezes hapends in create_image () .... offset_bytes = cols_to_bytes(bp->f_download, offset_cols, cols_ret); bytes_in_filename = cols_to_bytes(bp-> f_download + offset_bytes, MAX_FILENAME_COLS - padding, cols_ret); //here we can read after the end of the string memcpy (p, bp-> f_download + offset_bytes, bytes_in_filename); p + = bytes_in_filename; padding = MAX_FILENAME_COLS - (padding + * cols_ret); // padding can be negative_ // (size_t) -3 ??? memset (p, '', padding + 1); p + = padding + 1; debug build is free from crashes. anyway after applying - *ncols = cols; - return cols; + int len = strlen(mbs); + int ret = (len < cols ? len : cols); + *ncols = ret; + return ret; crashes disapieres but unsure about japanese, korean, chinese _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?54126> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/