Skip to content

Commit f050971

Browse files
committed
gh-159561: Return early on non-int optval in AF_VSOCK setsockopt()
1 parent a2c999b commit f050971

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎Modules/socketmodule.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3424,6 +3424,7 @@ sock_setsockopt(PyObject *self, PyObject *args)
34243424
PyErr_Format(PyExc_TypeError,
34253425
"setsockopt() argument 3 for AF_VSOCK must be an int (got %T)",
34263426
optval);
3427+
return NULL;
34273428
}
34283429
uint64_t vflag; // Must be set width of 64 bits
34293430
/* setsockopt(level, opt, flag) */

0 commit comments

Comments
 (0)