mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 9.0.1913: if_python: undefined behaviour for function pointers
Problem: if_python: undefined behaviour for function pointers Solution: Fix if_python undefined behavior for function pointer casts Identified by clang 17 UBSAN (see #12745). Make sure to cast function pointers with the same signature only. closes: #13122 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
This commit is contained in:
committed by
Christian Brabandt
parent
6f00d17e8d
commit
2ce070c27a
@@ -5962,14 +5962,15 @@ static struct PyMethodDef CurrentMethods[] = {
|
||||
};
|
||||
|
||||
static void
|
||||
init_range_cmd(exarg_T *eap)
|
||||
init_range_cmd(void *arg)
|
||||
{
|
||||
exarg_T *eap = (exarg_T*)arg;
|
||||
RangeStart = eap->line1;
|
||||
RangeEnd = eap->line2;
|
||||
}
|
||||
|
||||
static void
|
||||
init_range_eval(typval_T *rettv UNUSED)
|
||||
init_range_eval(void *rettv UNUSED)
|
||||
{
|
||||
RangeStart = (PyInt) curwin->w_cursor.lnum;
|
||||
RangeEnd = RangeStart;
|
||||
|
Reference in New Issue
Block a user