Opened 17 years ago
Last modified 17 years ago
#2302 new defect
Long DATA field in Oracle LAYER
Reported by: | dcorpataux | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Input - Native Oracle Spatial Support | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
If the DATA field length of an Oracle LAYER is longer than 2037 characters, an malloc(): memory corruption
occurs in glibc. The problem seems to take place in maporaclespatial.c memory allocation mechanism.
Tested on Ubuntu 2.6.20-16, apache 2.2.3, with mapserver 4.10.1 and 4.10.3 loaded as a module
Outline of a test case:
LAYER CONNECTION "user/password@myoracleoracle9instance" CONNECTIONTYPE ORACLESPATIAL DATA "[Put a query larger than 2037 characters here]" METADATA END NAME "oracle_test_layer" PROJECTION "init=epsg:4326" END SIZEUNITS PIXELS STATUS ON TOLERANCEUNITS PIXELS TYPE POLYGON UNITS METERS CLASS METADATA END STYLE ANGLE 360 OUTLINECOLOR 255 0 0 END END END
Note: A large sql query can be built by adding a lot of "always true" clauses, or by padding it with a lot of spaces; eg.
shape from (select shape from my_table where 'djfksdhfjkdsf' = 'djfksdhfjkdsf' and 'djfksdhfjkdsf' = 'djfksdhfjkdsf' [...])
Note:
See TracTickets
for help on using tickets.
Fix proposition, esay to apply, tested and working on 4.10.1 and 4.10.3, see Andreas Albarello's post on the users ml.
Fixes the problem at the cost of larger memory usage.