-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add polygonToCellsNoHoles fuzzer #557
Add polygonToCellsNoHoles fuzzer #557
Conversation
geoPolygon.numHoles = 0; | ||
geoPolygon.holes = NULL; | ||
geoPolygon.geoloop.numVerts = numVerts; | ||
geoPolygon.geoloop.verts = (LatLng *)(data + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my info - why + 1
? Oh, because the first uint_8
is the res? Might be worth a comment.
I imagine that most fuzzer runs would error quickly on an invalid res
here, and never exercise the polyfill...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still better than fuzzerPoylgonToCells.c which is very difficult for the fuzzer to make progress on; here it only needs to guess one byte correctly (polygonToCells actually takes an int but I don't think that's quite as relevant) which I believe is very doable.
Based on #553. This adds a second fuzzer for polygonToCells which does not require the fuzzer to guess the correct number of cells.