Bug 20063

Summary: XKeysymToString can leak memory
Product: xorg Reporter: Kimmo Hämäläinen <kimmo.hamalainen>
Component: Lib/XlibAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED DUPLICATE QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: ARM   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Kimmo Hämäläinen 2009-02-11 06:57:20 UTC
According to the man page about XKeysymToString "The returned string is in a static area and must not be modified."  But:

<kuzak> it uses malloc() and it's leaked
<kuzak> so is it a bug in xlib?
<daniels> yeah
<daniels> if the lookup succeeds, then you're safe because it returns a pointer into the xrm area
<daniels> if the lookup fails and it just returns a unicode code, then it mallocs
Comment 1 Julien Cristau 2009-02-17 06:33:22 UTC

*** This bug has been marked as a duplicate of bug 7100 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.