Skip to content

Commit 00ee3cb

Browse files
committed
Fix stack smashing of set_active_profile
1 parent 8ad20f1 commit 00ee3cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

masterkeys/masterkeys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ static PyObject* masterkeys_get_active_profile(PyObject* self, PyObject* args) {
246246

247247
static PyObject* masterkeys_set_active_profile(PyObject* self, PyObject* args) {
248248
/** Set the active profile on the keyboard */
249-
char profile;
249+
long profile;
250250
if (!PyArg_ParseTuple(args, "i", &profile))
251251
return NULL;
252252
int r = libmk_set_active_profile(NULL, profile);
@@ -343,7 +343,7 @@ static struct PyMethodDef masterkeys_funcs[] = {
343343
masterkeys_set_control_mode,
344344
METH_VARARGS,
345345
"Set the control mode of the keyboard"
346-
},{NULL, NULL, 0, NULL}
346+
}, {NULL, NULL, 0, NULL}
347347
};
348348

349349

0 commit comments

Comments
 (0)