mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ui_bridge: Fix passing NULL pointer to memcpy
This commit is contained in:
parent
a4c4173535
commit
29b998be68
@ -233,8 +233,11 @@ static void ui_bridge_highlight_set_event(void **argv)
|
|||||||
|
|
||||||
static void ui_bridge_put(UI *b, uint8_t *text, size_t size)
|
static void ui_bridge_put(UI *b, uint8_t *text, size_t size)
|
||||||
{
|
{
|
||||||
uint8_t *t = xmalloc(8);
|
uint8_t *t = NULL;
|
||||||
memcpy(t, text, size);
|
if (text) {
|
||||||
|
t = xmalloc(8);
|
||||||
|
memcpy(t, text, size);
|
||||||
|
}
|
||||||
UI_CALL(b, put, 3, b, t, INT2PTR(size));
|
UI_CALL(b, put, 3, b, t, INT2PTR(size));
|
||||||
}
|
}
|
||||||
static void ui_bridge_put_event(void **argv)
|
static void ui_bridge_put_event(void **argv)
|
||||||
|
Loading…
Reference in New Issue
Block a user