Verify 'path' is a Ruby string

This commit is contained in:
0x1eef 2024-03-20 17:13:35 -03:00
parent 3528765df4
commit 9f6eb714dc

View file

@ -8,6 +8,7 @@ int
bsdcontrol_open(VALUE path)
{
int fd;
Check_Type(path, T_STRING);
fd = open(RSTRING_PTR(path), O_PATH);
if (fd == -1)
{