Ticket #1044 (closed defect: fixed)
nband and nbands not crash-safe
|Reported by:||robe||Owned by:||pracine|
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.
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;