Bug 17066 - [PATCH] Fix strndup implementation in PK
Summary: [PATCH] Fix strndup implementation in PK
Status: RESOLVED INVALID
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: libpolkit (show other bugs)
Version: unspecified
Hardware: Other FreeBSD
: medium major
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-10 21:02 UTC by Joe Marcus Clarke
Modified: 2009-10-21 10:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix strndup implementation in PK (778 bytes, patch)
2008-08-10 21:02 UTC, Joe Marcus Clarke
Details | Splinter Review

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.