Bug 17066

Summary: [PATCH] Fix strndup implementation in PK
Product: PolicyKit Reporter: Joe Marcus Clarke <marcus>
Component: libpolkitAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED INVALID QA Contact: David Zeuthen (not reading bugmail) <zeuthen>
Severity: major    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix strndup implementation in PK

Description Joe Marcus Clarke 2008-08-10 21:02:09 UTC
Created attachment 18205 [details] [review]
Fix strndup implementation in PK

The strndup implementation corrupts memory which may lead to a crash if it's passed a string which is not NUL-terminated.  The API for strndup() states that is must handle non NUL-terminated strings.  Attached is a patch which corrects this.
Comment 1 David Zeuthen (not reading bugmail) 2009-10-21 10:37:10 UTC
This bug report is for the old version of PolicyKit. Closing as all of the code has been rewritten. Please reopen if the bug report applies to the latest version of PolicyKit. Thanks.

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.