Skip to content
Permalink
Browse files

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

Coverity Scan found this issue.
  • Loading branch information...
mame committed Dec 2, 2019
1 parent 424ad9a commit 8bddf1bc9bdd1db7ce2e3fec15f2f06ff355b0a7
Showing with 2 additions and 2 deletions.
  1. +2 −2 mjit.c
4 mjit.c
@@ -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;
}

0 comments on commit 8bddf1b

Please sign in to comment.
You can’t perform that action at this time.