Coverity SECURE_CODING - CID 10689
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Unity | Status tracked in Trunk | |||||
Trunk |
Triaged
|
Medium
|
Unassigned | |||
unity (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
This bug is exported from the Coverity Integration Manager on Canonical's servers. For information on how this is done please see this website: https:/
CID: 10689
Checker: SECURE_CODING
Category: No category available
CWE definition: http://
File: /tmp/buildd/
Function: panel_service_
Code snippet:
403 IndicatorObject
404 PanelServicePrivate *priv = self->priv;
405
406 /* FIXME: eeek, why do we even do this? */
CID 10689 - SECURE_CODING
[VERY RISKY]. Using "sscanf" can cause a buffer overflow when done incorrectly. sscanf() assumes an arbitrarily large string, so callers must use correct precision specifiers or never use sscanf(). Use correct precision specifiers or do your own parsing.
407 if (sscanf (entry_id, "%p", &probably_entry) == 1)
408 {
409 /* check that there really is such IndicatorObject
410 indicator = g_hash_table_lookup (priv->
411 probably_entry);
412 if (object) *object = indicator;
Source file with Coverity annotations.