← Back to team overview

desktop-packages team mailing list archive

[Bug 957582] Re: Coverity SECURE_CODING - CID 10019

 

** Changed in: compiz-core
       Status: New => Won't Fix

** Changed in: compiz-core/0.9.5
       Status: New => Won't Fix

** Changed in: compiz
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to compiz in Ubuntu.
https://bugs.launchpad.net/bugs/957582

Title:
  Coverity SECURE_CODING - CID 10019

Status in Compiz:
  Fix Released
Status in Compiz Core:
  Won't Fix
Status in Compiz Core 0.9.5 series:
  Won't Fix
Status in “compiz” package in Ubuntu:
  Fix Released

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://wiki.ubuntu.com/CanonicalProductStrategy/Coverity
  CID: 10019
  Checker: SECURE_CODING
  Category: No category available
  CWE definition: http://cwe.mitre.org/data/definitions/676.html
  File: /tmp/buildd/compiz-0.9.7.0~bzr3025/libdecoration/decoration.c
  Function: decor_acquire_dm_session()
  Code snippet:
  2897     dm_name_atom = XInternAtom (xdisplay, "_COMPIZ_DM_NAME", 0);
  2898 
  2899     utf8_string_atom = XInternAtom (xdisplay, "UTF8_STRING", 0);
  2900 
  CID 10019 - 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.
  2901     sprintf (buf, "_COMPIZ_DM_S%d", screen);
  2902     dm_sn_atom = XInternAtom (xdisplay, buf, 0);
  2903 
  2904     current_dm_sn_owner = XGetSelectionOwner (xdisplay, dm_sn_atom);
  2905 
  2906     if (current_dm_sn_owner != None)

To manage notifications about this bug go to:
https://bugs.launchpad.net/compiz/+bug/957582/+subscriptions