Skip to content
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

Fix undefined behaviour with negative input in TYPMOD_GET_SRID #152

Closed
wants to merge 1 commit into from

Conversation

Algunenano
Copy link
Member

Fixes an undefined behaviour when the SRID is negative.

Some output example using undefined behaviour sanitizer:

Running test 'test_typmod_macros' in suite 'serialization/deserialization'.
cu_libgeom.c:35:7: runtime error: left shift of 535589632 by 3 places cannot be represented in type 'int'
cu_libgeom.c:45:14: runtime error: left shift of 280871168 by 3 places cannot be represented in type 'int'

@Algunenano
Copy link
Member Author

Associated trac ticket: https://trac.osgeo.org/postgis/ticket/3880

@pramsey pramsey closed this Oct 6, 2017
@Algunenano Algunenano deleted the typmod branch November 15, 2019 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants