Ticket #1044 (closed defect: fixed)
nband and nbands not crash-safe
| Reported by: | robe | Owned by: | pracine |
|---|---|---|---|
| Priority: | blocker | Milestone: | PostGIS 2.0.0 |
| Component: | raster | Version: | trunk |
| Keywords: | Cc: |
Description
For at least the output functions like ST_AsPNG and ST_AsJPEG, if I pass in a band number or in the nbands add a band that is higher than my number of bands, it crashes the server.
e.g.
SELECT ST_AsJPEG(rast,80) As rastjpg
FROM dummy_rast WHERE rid=2;
Note in this example I accidentally assumed the second arg was quality, but it was band number and it crashed my postgres service
Same thing happens if I do this (I only have 3 bands)
SELECT ST_AsJPEG(rast,ARRAY[2,1,3,4],ARRAY['QUALITY=90','PROGRESSIVE=ON']) As rastjpg
FROM dummy_rast WHERE rid=2;
Change History
Note: See
TracTickets for help on using
tickets.
