Re: [mapserver-users] MapServer 5.4.0 Buffer Overflow Error

2009-05-20 Thread Juan Felipe Alvarez Saldarriaga
Thx Umberto, I'll try to reinstall GDAL then, thx :).

On Wed, May 20, 2009 at 12:39 AM, Umberto Nicoletti
umberto.nicole...@gmail.com wrote:
 This is a known issue with recent Ubuntu systems which is caused by a
 special compiler feature (called fortify) which enables a protection
 system against the most common memory management errors. Unfortunately
 as a result of this GDAL will break and dependent sw become unusable
 (mapserver, grass, qgis, etc).

 Luckily there is a workaround: remove the gdal installed by canonical
 and install the packages from ubuntu gis project instead:

 https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable

 You may have to recompile mapserver after this.
 Happy hacking,
 Umberto

 On Wed, May 20, 2009 at 5:18 AM, Juan Felipe Alvarez Saldarriaga
 jfalva...@vesifront.org wrote:
 Hey!.

 I'm trying to load a WMS layer, but I got always a buffer overflow
 error, thx for any advice! :)

 This is my mapserv config:

 r...@vesifront:/usr/lib/cgi-bin# ./mapserv -v
 MapServer version 5.4.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
 OUTPUT=SVG
  SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER 
 SUPPORTS=WMS
 _CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE

 My system is a Ubuntu Linux 9.04 and this is the WMS layer into the map file:

  LAYER
    NAME 'Mapa Base'
    TYPE RASTER
    CONNECTIONTYPE WMS
    CONNECTION http://wms.jpl.nasa.gov/browse.cgi?wms_server=wms.cgi;
    METADATA
      'wms_server_version' '1.1.1'
      'wms_format' 'image/jpeg'
      'wms_style' ''
      'wms_name' 'BMNG'
    END
    METADATA
       # 'wms_title' 'Mapa Base'
       'wms_title' 'BMNG'
    END
    STATUS DEFAULT
    TRANSPARENCY 100
    PROJECTION
        init=epsg:4326
    END
  END

 And this is the error that I got when I try to test the map file with 
 shp2img:

 r...@vesifront:/usr/lib/cgi-bin# shp2img -all_debug 3 -m 
 /home/jfalvarez/projec
 ts/cms/branches/V1/docroot/map-files/9182340517c2d323061dc1cffea6e431.map -o 
 ou
 t.png
 [Tue May 19 22:14:03 2009].813526 msLoadMap(): 0.006s
 [Tue May 19 22:14:03 2009].816973 HTTP: Starting to prepare HTTP requests.
 [Tue May 19 22:14:03 2009].817552 HTTP request: id=0, 
 http://wms.jpl.nasa.gov/br
 owse.cgi?wms_server=wms.cgiLAYERS=BMNGREQUEST=GetMapSERVICE=WMSFORMAT=image/
 jpegSTYLES=HEIGHT=600VERSION=1.1.1SRS=EPSG:4326WIDTH=800BBOX=-94.076794657
 7629,-54.0575959933222,-1.92320534223706,15.0575959933222TRANSPARENT=TRUEEXCEP
 TIONS=application/vnd.ogc.se_inimage
 [Tue May 19 22:14:03 2009].819297 HTTP: Before download loop
 [Tue May 19 22:14:04 2009].175669 msHTTPWriteFct(id=0, 852 bytes)
 [Tue May 19 22:14:04 2009].279581 HTTP: After download loop
 [Tue May 19 22:14:04 2009].280033 msHTTPExecuteRequests() timing summary per 
 lay
 er (connect_time + time_to_first_packet + download_time = total_time in 
 seconds)

 [Tue May 19 22:14:04 2009].280572 Layer 0: 0.169 + 0.186 + 0.274 = 0.629s
 [Tue May 19 22:14:04 2009].281375 msDrawRasterLayerLow(BMNG): entering.
 *** buffer overflow detected ***: shp2img terminated
 === Backtrace: =
 /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb6a87da8]
 /lib/tls/i686/cmov/libc.so.6[0xb6a85eb0]
 /lib/tls/i686/cmov/libc.so.6(__strcpy_chk+0x44)[0xb6a85184]
 shp2img(msDrawRasterLayerLow+0x91d)[0x80c4e0d]
 shp2img(msDrawRasterLayer+0x7b)[0x807ffab]
 shp2img(msDrawLayer+0x35e)[0x8080f0e]
 shp2img(msDrawWMSLayerLow+0x598)[0x80d57d8]
 shp2img(msDrawMap+0x834)[0x8082794]
 shp2img(main+0x912)[0x8059722]
 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb69a0775]
 shp2img[0x8058d71]
 === Memory map: 
 08048000-0811 r-xp  fd:00 197813     /usr/local/bin/shp2img
 0811-08111000 r--p 000c7000 fd:00 197813     /usr/local/bin/shp2img
 08111000-08114000 rw-p 000c8000 fd:00 197813     /usr/local/bin/shp2img
 08114000-08222000 rw-p 08114000 00:00 0          [heap]
 b588c000-b5891000 r-xp  fd:00 98403      
 /lib/tls/i686/cmov/libnss_dns-2
 .9.so
 b5891000-b5892000 r--p 4000 fd:00 98403      
 /lib/tls/i686/cmov/libnss_dns-2
 .9.so
 b5892000-b5893000 rw-p 5000 fd:00 98403      
 /lib/tls/i686/cmov/libnss_dns-2
 .9.so
 b5893000-b589d000 r-xp  fd:00 98405      
 /lib/tls/i686/cmov/libnss_files
 -2.9.so
 b589d000-b589e000 r--p 9000 fd:00 98405      
 /lib/tls/i686/cmov/libnss_files
 -2.9.so
 b589e000-b589f000 rw-p a000 fd:00 98405      
 /lib/tls/i686/cmov/libnss_files
 -2.9.so
 b589f000-b58a3000 rw-p b589f000 00:00 0
 b58a3000-b58a6000 r-xp  fd:00 49415      /lib/libgpg-error.so.0.3.0
 b58a6000-b58a7000 rw-p 2000 fd:00 49415      /lib/libgpg-error.so.0.3.0
 b58a7000-b58ab000 r-xp  fd:00 199058     /usr/lib/libXdmcp.so.6.0.0
 b58ab000-b58ac000 rw-p 3000 fd:00 199058     /usr/lib/libXdmcp.so.6.0.0
 b58ac000-b58ae000 r-xp  fd:00 197736     /usr/lib/libXau.so.6.0.0
 b58ae000-b58af000 r--p 1000 fd:00 197736     /usr/lib/libXau.so.6.0.0
 b58af000-b58b rw-p 2000 fd:00 197736

[mapserver-users] MapServer 5.4.0 Buffer Overflow Error

2009-05-19 Thread Juan Felipe Alvarez Saldarriaga
Hey!.

I'm trying to load a WMS layer, but I got always a buffer overflow
error, thx for any advice! :)

This is my mapserv config:

r...@vesifront:/usr/lib/cgi-bin# ./mapserv -v
MapServer version 5.4.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG
 SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS
_CLIENT INPUT=TIFF INPUT=EPPL7 INPUT=GDAL INPUT=SHAPEFILE

My system is a Ubuntu Linux 9.04 and this is the WMS layer into the map file:

  LAYER
NAME 'Mapa Base'
TYPE RASTER
CONNECTIONTYPE WMS
CONNECTION http://wms.jpl.nasa.gov/browse.cgi?wms_server=wms.cgi;
METADATA
  'wms_server_version' '1.1.1'
  'wms_format' 'image/jpeg'
  'wms_style' ''
  'wms_name' 'BMNG'
END
METADATA
   # 'wms_title' 'Mapa Base'
   'wms_title' 'BMNG'
END
STATUS DEFAULT
TRANSPARENCY 100
PROJECTION
init=epsg:4326
END
  END

And this is the error that I got when I try to test the map file with shp2img:

r...@vesifront:/usr/lib/cgi-bin# shp2img -all_debug 3 -m /home/jfalvarez/projec
ts/cms/branches/V1/docroot/map-files/9182340517c2d323061dc1cffea6e431.map -o ou
t.png
[Tue May 19 22:14:03 2009].813526 msLoadMap(): 0.006s
[Tue May 19 22:14:03 2009].816973 HTTP: Starting to prepare HTTP requests.
[Tue May 19 22:14:03 2009].817552 HTTP request: id=0, http://wms.jpl.nasa.gov/br
owse.cgi?wms_server=wms.cgiLAYERS=BMNGREQUEST=GetMapSERVICE=WMSFORMAT=image/
jpegSTYLES=HEIGHT=600VERSION=1.1.1SRS=EPSG:4326WIDTH=800BBOX=-94.076794657
7629,-54.0575959933222,-1.92320534223706,15.0575959933222TRANSPARENT=TRUEEXCEP
TIONS=application/vnd.ogc.se_inimage
[Tue May 19 22:14:03 2009].819297 HTTP: Before download loop
[Tue May 19 22:14:04 2009].175669 msHTTPWriteFct(id=0, 852 bytes)
[Tue May 19 22:14:04 2009].279581 HTTP: After download loop
[Tue May 19 22:14:04 2009].280033 msHTTPExecuteRequests() timing summary per lay
er (connect_time + time_to_first_packet + download_time = total_time in seconds)

[Tue May 19 22:14:04 2009].280572 Layer 0: 0.169 + 0.186 + 0.274 = 0.629s
[Tue May 19 22:14:04 2009].281375 msDrawRasterLayerLow(BMNG): entering.
*** buffer overflow detected ***: shp2img terminated
=== Backtrace: =
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb6a87da8]
/lib/tls/i686/cmov/libc.so.6[0xb6a85eb0]
/lib/tls/i686/cmov/libc.so.6(__strcpy_chk+0x44)[0xb6a85184]
shp2img(msDrawRasterLayerLow+0x91d)[0x80c4e0d]
shp2img(msDrawRasterLayer+0x7b)[0x807ffab]
shp2img(msDrawLayer+0x35e)[0x8080f0e]
shp2img(msDrawWMSLayerLow+0x598)[0x80d57d8]
shp2img(msDrawMap+0x834)[0x8082794]
shp2img(main+0x912)[0x8059722]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0xb69a0775]
shp2img[0x8058d71]
=== Memory map: 
08048000-0811 r-xp  fd:00 197813 /usr/local/bin/shp2img
0811-08111000 r--p 000c7000 fd:00 197813 /usr/local/bin/shp2img
08111000-08114000 rw-p 000c8000 fd:00 197813 /usr/local/bin/shp2img
08114000-08222000 rw-p 08114000 00:00 0  [heap]
b588c000-b5891000 r-xp  fd:00 98403  /lib/tls/i686/cmov/libnss_dns-2
.9.so
b5891000-b5892000 r--p 4000 fd:00 98403  /lib/tls/i686/cmov/libnss_dns-2
.9.so
b5892000-b5893000 rw-p 5000 fd:00 98403  /lib/tls/i686/cmov/libnss_dns-2
.9.so
b5893000-b589d000 r-xp  fd:00 98405  /lib/tls/i686/cmov/libnss_files
-2.9.so
b589d000-b589e000 r--p 9000 fd:00 98405  /lib/tls/i686/cmov/libnss_files
-2.9.so
b589e000-b589f000 rw-p a000 fd:00 98405  /lib/tls/i686/cmov/libnss_files
-2.9.so
b589f000-b58a3000 rw-p b589f000 00:00 0
b58a3000-b58a6000 r-xp  fd:00 49415  /lib/libgpg-error.so.0.3.0
b58a6000-b58a7000 rw-p 2000 fd:00 49415  /lib/libgpg-error.so.0.3.0
b58a7000-b58ab000 r-xp  fd:00 199058 /usr/lib/libXdmcp.so.6.0.0
b58ab000-b58ac000 rw-p 3000 fd:00 199058 /usr/lib/libXdmcp.so.6.0.0
b58ac000-b58ae000 r-xp  fd:00 197736 /usr/lib/libXau.so.6.0.0
b58ae000-b58af000 r--p 1000 fd:00 197736 /usr/lib/libXau.so.6.0.0
b58af000-b58b rw-p 2000 fd:00 197736 /usr/lib/libXau.so.6.0.0
b58b-b58c5000 r-xp  fd:00 98398  /lib/tls/i686/cmov/libnsl-2.9.s
o
b58c5000-b58c6000 r--p 00014000 fd:00 98398  /lib/tls/i686/cmov/libnsl-2.9.s
o
b58c6000-b58c7000 rw-p 00015000 fd:00 98398  /lib/tls/i686/cmov/libnsl-2.9.s
o
b58c7000-b58ca000 rw-p b58c7000 00:00 0
b58ca000-b58cc000 r-xp  fd:00 49292  /lib/libkeyutils-1.2.so
b58cc000-b58cd000 r--p 1000 fd:00 49292  /lib/libkeyutils-1.2.so
b58cd000-b58ce000 rw-p 2000 fd:00 49292  /lib/libkeyutils-1.2.so
b58ce000-b58d5000 r-xp  fd:00 198044 /usr/lib/libkrb5support.so.0.1
b58d5000-b58d6000 r--p 6000 fd:00 198044 /usr/lib/libkrb5support.so.0.1
b58d6000-b58d7000 rw-p 7000 fd:00 198044 /usr/lib/libkrb5support.so.0.1
b58d7000-b58f9000 r-xp  fd:00 197986 /usr/lib/libk5crypto.so.3.1
b58f9000-b58fa000 r--p 00022000 fd:00 197986