Coverity SECURE_CODING - CID 10020
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Compiz |
Fix Released
|
Medium
|
MC Return | ||
Compiz Core |
Won't Fix
|
Medium
|
Unassigned | ||
0.9.5 |
Won't Fix
|
Undecided
|
Unassigned | ||
compiz (Ubuntu) |
Fix Released
|
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: 10020
Checker: SECURE_CODING
Category: No category available
CWE definition: http://
File: /tmp/buildd/
Function: decor_handle_
Code snippet:
3168 {
3169 Atom dm_sn_atom;
3170 char buf[128];
3171
CID 10020 - SECURE_CODING
[VERY RISKY]. Using "sprintf" can cause a buffer overflow when done incorrectly. Because sprintf() assumes an arbitrarily long string, callers must be careful not to overflow the actual space of the destination. Use snprintf() instead, or correct precision specifiers.
3172 sprintf (buf, "_COMPIZ_DM_S%d", screen);
3173 dm_sn_atom = XInternAtom (xdisplay, buf, 0);
3174
3175 if (xevent-
3176 return DECOR_SELECTION
3177
Related branches
- Sam Spilsbury: Approve
- PS Jenkins bot: Pending (continuous-integration) requested
-
Diff: 133 lines (+12/-12)7 files modifiedlibdecoration/decoration.c (+1/-1)
plugins/composite/src/screen.cpp (+1/-1)
plugins/dbus/src/dbus.cpp (+2/-2)
plugins/loginout/src/loginout.cpp (+2/-2)
plugins/screenshot/src/screenshot.cpp (+1/-1)
plugins/water/src/water.cpp (+3/-3)
src/screen.cpp (+2/-2)
Changed in compiz: | |
importance: | Undecided → Medium |
Changed in compiz: | |
status: | In Progress → Fix Committed |
Changed in compiz: | |
status: | Fix Committed → Fix Released |
Changed in compiz-core: | |
status: | New → Won't Fix |
Source file with Coverity annotations.