Commit: 20a0255b9e5fc40868dae916940601a0eaa64dc8
Parent: 49d06560692f4307635a28b627a00d8c81948c48
Author: Bastien Nocera <hadess@hadess.net>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-05-16 23:37:41
Tree: 3965c12826603958acf1b2f45e77e58fbea6a2ff

gdbus: Check sprintf retval Error: SNYK_CODE_WARNING (CWE-125): [#def63] [important] gdbus/watch.c:131:11: error[cpp/NegativeIndex]: The value from snprintf, a standard library function that can return a negative value is used as an index. A negative array index can lead to reading or writing outside the bounds of the array. Ensure the value of the index used is within bounds before use. 129| int offset; 130| 131|-> offset = snprintf(rule, size, "type='signal'"); 132| sender = data->name ? : data->owner; 133|

Diffstat

M gdbus/watch.c | 46 ++++++++++++++++++++++++++++++++++- - - - - - - - - - - -

1 files changed, 34 insertions(+), 12 deletions(-)

View Full Diff | Patch