Skip to content

[P1] create_neovi_radio_message() crashes because its keyword array is not null-terminated #238

Description

@drebbe-intrepid

Bug

The kwords array ends at "relay_timeout" instead of a NULL sentinel. PyArg_ParseTupleAndKeywords reads past the end of this stack array.

Reviewed commit: 45167e09de6b886cd451a4245f842c8221349711 (current master on 2026-09-15).
Source: src/methods.cpp:2445

Reproduction

import ics
print(ics.create_neovi_radio_message())

Observed / expected

A no-argument call exits with 0xC0000005. Expected the default five-byte tuple (0, 0, 0, 0, 0). This is hardware-independent.

Suggested fix and regression coverage

Append NULL to kwords. Add subprocess tests for no arguments, all valid keywords, and an unknown keyword. Also use byte-sized destinations for the b format units, or change the format to match the existing int variables.

Validation environment

Windows x64, CPython 3.14.5, extension rebuilt from the commit above. Hardware-dependent entry points below were exercised with a mock DLL, not a connected device. The existing 30 tests pass despite these findings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions