fcw.org-server icon indicating copy to clipboard operation
fcw.org-server copied to clipboard

More robust supercows.txt parsing

Open andreasrosdal opened this issue 4 years ago • 3 comments

FIXME! This method needs to be reviewed to prevent segmentation faults if the supercows file contains invalid text.

https://github.com/Lexxie9952/fcw.org-server/commit/2ee0536fe1923e53161b846bde25a16d4ca36472#diff-ec02b538612aa7bf8f2c54f2561be2c6R3730

andreasrosdal avatar Aug 27 '20 20:08 andreasrosdal

What should the correct behavior be when the text is invalid? If the method returns false is that acceptable?

JosiahWI avatar Feb 11 '21 17:02 JosiahWI

Yes, then it should return False. Most importantly, not segfault. it could log the error.

andreasrosdal avatar Feb 11 '21 17:02 andreasrosdal

we also need help with this: https://github.com/freeciv/freeciv-web/issues/319

andreasrosdal avatar Feb 11 '21 17:02 andreasrosdal