Opened 6 years ago

Closed 6 years ago

#15294 closed defect (fixed)

LinearMatroid.is_field_equivalent is unsafe when self is other

Reported by: Stefan Owned by:
Priority: trivial Milestone: sage-6.1
Component: matroid theory Keywords:
Cc: stefan, yomcat Merged in:
Authors: Rudi Pendavingh Reviewers: Michael Welsh
Report Upstream: N/A Work issues:
Branch: u/Rudi/ticket/15294 (Commits) Commit: 72b1d57d994eb6a6a45c5be2958b6ed280e4e549
Dependencies: Stopgaps:

Description

The code for LinearMatroid.is_field_equivalent will call LinearMatroid._is_field_isomorphism without ensuring that self and other are different objects. The latter function assumes (by design) that they are. The current implementation happens to give the right answer, but this could change when LinearMatroid._is_field_isomorphism changes its algorithm.

Solution: if self is other, just return True.

Change History (4)

comment:1 Changed 6 years ago by Rudi

  • Branch set to u/Rudi/ticket/15294
  • Created changed from 10/16/13 19:02:11 to 10/16/13 19:02:11
  • Modified changed from 10/16/13 19:02:11 to 10/16/13 19:02:11

comment:2 Changed 6 years ago by Rudi

  • Authors set to Rudi Pendavingh
  • Cc stefan yomcat added
  • Commit set to 72b1d57d994eb6a6a45c5be2958b6ed280e4e549
  • Status changed from new to needs_review

Implemented your solution.


New commits:

72b1d57LinearMatroid.is_field_equivalent now tests if self is other before calling LinearMatroid._is_field_isomorphism.

comment:3 Changed 6 years ago by yomcat

  • Reviewers set to Michael Welsh
  • Status changed from needs_review to positive_review

Yup, all good.

comment:4 Changed 6 years ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.