Skip to content

_input.upload_effect() segfaults when the effect data is not bytes #261

Open

Description

@theosotr

Summary

upload_effect() accepts any object as its second argument and copies from it without checking the conversion succeeded. For a non-bytes object the interpreter seg faults.

Expected: a TypeError should be raised instead.

Environment

  • evdev 2.0.0
  • Python 3.13.5

Reproducer

import evdev._input

evdev._input.upload_effect(0, None)
Segmentation fault (core dumped)

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions