]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1339: missing out-of-memory checks for enc_to_utf16()/utf16_to_enc() v9.1.1339
authorJohn Marriott <basilisk@internode.on.net>
Wed, 23 Apr 2025 18:56:08 +0000 (20:56 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 23 Apr 2025 18:56:08 +0000 (20:56 +0200)
commit031f2273cb8c19aeb4f40bd56362cff0b338b84f
tree5b73a4e6d81c5c81e434b3765de338ea0280339e
parentec270a5f5554c62517246281afb547b5c2fe65af
patch 9.1.1339: missing out-of-memory checks for enc_to_utf16()/utf16_to_enc()

Problem:  missing out-of-memory checks for enc_to_utf16() and
          utf16_to_enc()
Solution: Add out-of-memory checks and fix a few other minor issues
          (John Marriott)

This change does:
-  add missing out-of-memory checks for enc_to_utf16() and
   utf16_to_enc()
-  add a small optimisation in mch_errmsg_c() and mch_msg_c() (in
   message.c) to only call STRLEN() if needed.
-  fix a memory leak in winpty_term_and_job_init() (in terminal.c).

closes: #17191

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/fileio.c
src/gui_w32.c
src/message.c
src/os_mswin.c
src/os_win32.c
src/terminal.c
src/version.c