• John Chadwick's avatar
    test: Make udev_properties array fixed-size. · a7d2b749
    John Chadwick authored
    The udev_properties array is currently variable length, which causes the
    tests to invoke undefined behavior on empty lists, as it attempts to
    access the first array item to check if the key is NULL, which is an out
    of bounds read and will fail when the struct alignment happens to line
    up such that there is no padding after the list in the empty list case.
    
    By making the udev_properties array 32 items long, it can encapsulate
    every existing case, with only a fairly small amount of memory overhead,
    and without requiring every single `TEST_DEVICE` call to initialize
    `udev_properties`.
    
    (cherry picked from commit b71a1b6e)
    a7d2b749
Name
Last commit
Last update
.gitlab/issue_templates Loading commit data...
.gitlab-ci Loading commit data...
completion/zsh Loading commit data...
doc Loading commit data...
include Loading commit data...
quirks Loading commit data...
src Loading commit data...
test Loading commit data...
tools Loading commit data...
udev Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.vimdir Loading commit data...
CODING_STYLE.md Loading commit data...
COPYING Loading commit data...
README.md Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...