Bug 89162

Summary: Matrix multiply operator typecheck missing
Product: pycairo Reporter: Lawrence D'Oliveiro <from-freedesktop>
Component: generalAssignee: Steve Chaplin <d74n5pohf9>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: typecheck Matrix.__mul__ second operand

Description Lawrence D'Oliveiro 2015-02-16 06:36:32 UTC
Created attachment 113517 [details]
typecheck Matrix.__mul__ second operand

In python3-cairo, the routine that implements the “*” operator between two Matrix objects neglects to ensure that its second operand really is a Matrix. Pass an arbitrary value, and it will cheerfully return nonsensical results, possibly even accessing invalid memory and causing a crash.

The enclosed patch adds the necessary typecheck.
Comment 1 Christoph Reiter 2017-07-05 15:06:57 UTC
Fixed since 1.12: https://github.com/pygobject/pycairo/issues/8

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.