Opened 7 years ago

Closed 7 years ago

#3891 closed defect (fixed)

Undefined behaviour in pointarray_to_encoded_polyline

Reported by: Raul Marin Owned by: strk
Priority: low Milestone: PostGIS 2.2.6
Component: liblwgeom Version: master
Keywords: Cc:

Description

Shifting a negative value is undefined, so I was getting the following warning:

$ LD_LIBRARY_PATH=../.libs/  ./.libs/cu_tester out_encoded_polyline_test_precision

Running test 'out_encoded_polyline_test_precision' in suite 'encoded_polyline_output'.
lwout_encoded_polyline.c:94:12: runtime error: left shift of negative value -250691

    PASSED - asserts -   2 passed,   0 failed,   2 total.

Fix in Github PR: https://github.com/postgis/postgis/pull/155

Change History (4)

comment:1 by pramsey, 7 years ago

In 15953:

Undefined behaviour in pointarray_to_encoded_polyline (2.2 branch)
(References #3891)

comment:2 by pramsey, 7 years ago

In 15954:

Undefined behaviour in pointarray_to_encoded_polyline (2.3 branch)
(References #3891)

comment:3 by pramsey, 7 years ago

In 15955:

Undefined behaviour in pointarray_to_encoded_polyline (2.4 branch)
(References #3891)

comment:4 by pramsey, 7 years ago

Resolution: fixed
Status: newclosed

In 15956:

Undefined behaviour in pointarray_to_encoded_polyline
(Closes #3891)

Note: See TracTickets for help on using tickets.