Ticket #724 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

[with patch] graph6 parsing does not throw an error when the string is the wrong size.

Reported by: jason Owned by: rlm
Priority: major Milestone: sage-2.8.10
Component: combinatorics Keywords: graph6, graph
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

Making a graph from a graph6 string should check to make sure the string is the right size and throw an error if the string is too long or too short. I believe now it just silently hands back a graph that is not correct.

This is bad, especially when your string has an escaped character and you didn't realize it :).

Attachments

7087.patch Download (1.6 KB) - added by rlm 6 years ago.
7148.patch Download (2.2 KB) - added by rlm 6 years ago.

Change History

comment:1 Changed 6 years ago by mabshoff

  • Milestone set to sage-2.9

Changed 6 years ago by rlm

comment:2 Changed 6 years ago by rlm

  • Owner changed from was to rlm
  • Status changed from new to assigned
  • Summary changed from graph6 parsing does not throw an error when the string is the wrong size. to [with patch] graph6 parsing does not throw an error when the string is the wrong size.

comment:3 Changed 6 years ago by rlm

  • Milestone changed from sage-2.9 to sage-2.8.10

comment:4 Changed 6 years ago by rlm

This patches cleanly onto 2.8.9.

comment:5 Changed 6 years ago by cwitty

Please add doctests to show the new exceptions. (Every bug fix should have a doctest.)

Thanks!

Changed 6 years ago by rlm

comment:6 Changed 6 years ago by cwitty

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