1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

mjit.c: fix a mismatch of malloc'ed type

Coverity Scan found this issue.
This commit is contained in:
Yusuke Endoh 2019-12-03 08:02:38 +09:00
parent 424ad9a493
commit 8bddf1bc9b

4
mjit.c
View file

@ -731,8 +731,8 @@ split_flags(const char *flags)
}
}
char **ret = xmalloc(sizeof(char **) * (i + 1));
memcpy((void *)ret, buf, sizeof(char **) * i);
char **ret = xmalloc(sizeof(char *) * (i + 1));
memcpy(ret, buf, sizeof(char *) * i);
ret[i] = NULL;
return ret;
}