Project

General

Profile

Actions

Bug #11770

closed

Fix off-by-one error when choosing a device from MODULE_DEVICE_TABLE

Added by Evgeny Novikov over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
High
Category:
Environment models
Target version:
Start date:
07/21/2022
Due date:
% Done:

0%

Estimated time:
Detected in build:
git
Platform:
Published in build:

Description

Originally implemented choice of a device from the MODULE_DEVICE_TABLE array suffers from the off-by-one error. It is not necessary to select the latest element from the array that corresponds to the terminator ("{}"). Otherwise, there are NULL pointer dereferences and so on. This bug was not fixed by #11007 that only changed the API and its implementation for the random choice so that SMG became to understand it better.

There are several dozens false alarms from several hundreds of warnings for Linux kernel drivers, so the issue is quite considerable.

Actions

Also available in: Atom PDF