There is a vulnerability in early versions of libstdc++-v3 that
completely disables the reading or importing of files into the drawing
editors of ivtools.  You might see this if you have libstdc++-v3
bundled with gcc-2.95.3, or you might see this with gcc-3.0.  The
problem was fixed in the version of libstdc++-v3 bundled with
gcc-3.0.1

The workaround is to apply this patch, which uses "r+" for fopen of
files to be read or imported.  "r+" is supposed to mean open for read
and write, but was required for plain reading with istream's.
Applying this will probably disable accessing read-only file systems,
i.e. CD-ROM's.  A better fix is to revert to libstdc++-v2 if you are
using gcc-2.95.*, or upgrade to at least gcc-3.0.1

Scott Johnston
http://www.ivtools.org

Index: OverlayUnidraw/ovcatalog.c
diff -c OverlayUnidraw/ovcatalog.c:1.3 OverlayUnidraw/ovcatalog.c:1.4
*** OverlayUnidraw/ovcatalog.c:1.3	Fri Jun 15 15:44:34 2001
--- src/OverlayUnidraw/ovcatalog.c	Mon Jul 16 15:22:19 2001
***************
*** 189,195 ****
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
  	    name = nil;
  	} else {
! 	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
  	    if (compressed) {
--- 189,195 ----
  	    _valid = fbuf.attach(fileno(stdin)) != 0;
  	    name = nil;
  	} else {
! 	    fptr = fopen(name, "r+");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
  	    if (compressed) {
***************
*** 201,207 ****
  #else
  	boolean stdin_flag = strcmp(name, "-")==0;
  	if (!stdin_flag) {
! 	  fptr = fopen(name, "r");
  	  fptr = fptr ? OvImportCmd::CheckCompression(fptr, name, compressed) : nil;
  	  _valid = fptr != nil;
  	  if (compressed) {
--- 201,207 ----
  #else
  	boolean stdin_flag = strcmp(name, "-")==0;
  	if (!stdin_flag) {
! 	  fptr = fopen(name, "r+");
  	  fptr = fptr ? OvImportCmd::CheckCompression(fptr, name, compressed) : nil;
  	  _valid = fptr != nil;
  	  if (compressed) {
Index: OverlayUnidraw/ovimport.c
diff -c OverlayUnidraw/ovimport.c:1.12 OverlayUnidraw/ovimport.c:1.13
*** OverlayUnidraw/ovimport.c:1.12	Mon Jul  9 17:13:55 2001
--- src/OverlayUnidraw/ovimport.c	Mon Jul 16 15:22:19 2001
***************
*** 760,766 ****
  
  
  const char* OvImportCmd::ReadCreator (const char* pathname) {
!     FILE* file = fopen(pathname, "r");
      const int creator_size = 32;
      static char creator[creator_size];
  
--- 760,766 ----
  
  
  const char* OvImportCmd::ReadCreator (const char* pathname) {
!     FILE* file = fopen(pathname, "r+");
      const int creator_size = 32;
      static char creator[creator_size];
  
***************
*** 2187,2193 ****
      int& ncols, int& nrows, boolean& compressed, boolean& tiled, int& twidth, 
      int& theight
  ) {
!     FILE* file = fopen(pathname, "r");
      file = CheckCompression(file, pathname, compressed);
    
      tiled = false;
--- 2187,2193 ----
      int& ncols, int& nrows, boolean& compressed, boolean& tiled, int& twidth, 
      int& theight
  ) {
!     FILE* file = fopen(pathname, "r+");
      file = CheckCompression(file, pathname, compressed);
    
      tiled = false;
***************
*** 2610,2616 ****
  
  Bitmap* OvImportCmd::PBM_Bitmap (const char* pathname) {
      Bitmap* bitmap = nil;
!     FILE* file = fopen(pathname, "r");
      boolean compressed;
      file = CheckCompression(file, pathname, compressed);
  
--- 2610,2616 ----
  
  Bitmap* OvImportCmd::PBM_Bitmap (const char* pathname) {
      Bitmap* bitmap = nil;
!     FILE* file = fopen(pathname, "r+");
      boolean compressed;
      file = CheckCompression(file, pathname, compressed);
  
Index: FrameUnidraw/framecatalog.c
diff -c FrameUnidraw/framecatalog.c:1.3 FrameUnidraw/framecatalog.c:1.4
*** FrameUnidraw/framecatalog.c:1.3	Fri Jun 15 15:44:38 2001
--- src/FrameUnidraw/framecatalog.c	Mon Jul 16 15:22:23 2001
***************
*** 71,77 ****
  #endif
  	    name = nil;
  	} else {
! 	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
  #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
--- 71,77 ----
  #endif
  	    name = nil;
  	} else {
! 	    fptr = fopen(name, "r+");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
  #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
Index: GraphUnidraw/graphcatalog.c
diff -c GraphUnidraw/graphcatalog.c:1.3 GraphUnidraw/graphcatalog.c:1.4
*** GraphUnidraw/graphcatalog.c:1.3	Fri Jun 15 15:44:40 2001
--- src/GraphUnidraw/graphcatalog.c	Mon Jul 16 15:22:25 2001
***************
*** 88,94 ****
  #endif
  	    name = nil;
  	} else {
! 	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
  #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
--- 88,94 ----
  #endif
  	    name = nil;
  	} else {
! 	    fptr = fopen(name, "r+");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
  #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
Index: DrawServ/drawcatalog.c
diff -c DrawServ/drawcatalog.c:1.3 DrawServ/drawcatalog.c:1.4
*** DrawServ/drawcatalog.c:1.3	Fri Jun 15 15:44:41 2001
--- src/DrawServ/drawcatalog.c	Mon Jul 16 15:22:26 2001
***************
*** 73,79 ****
  #endif
  	    name = nil;
  	} else {
! 	    fptr = fopen(name, "r");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
  #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
--- 73,79 ----
  #endif
  	    name = nil;
  	} else {
! 	    fptr = fopen(name, "r+");
  	    fptr = OvImportCmd::CheckCompression(fptr, name, compressed);
  #if __GNUG__<3
  	    _valid = fptr ? fbuf.attach(fileno(fptr)) != 0 : false;
