Skip to content

Fix crashes when parsing malformed menus#15

Open
jnlon wants to merge 2 commits intoafonsotrepa:masterfrom
jnlon:getmenu-fixes
Open

Fix crashes when parsing malformed menus#15
jnlon wants to merge 2 commits intoafonsotrepa:masterfrom
jnlon:getmenu-fixes

Conversation

@jnlon
Copy link

@jnlon jnlon commented Aug 31, 2019

Hi, this PR adds better exception handling to Connection.getMenu() resolving several crashes I have noticed in real-world gopher holes. It prevents crashes in at least the following cases:

  • A menu line is missing the item type character
  • A menu line port does not parse as an integer

In both cases the line is treated as an unknown page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant