Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] [GeoIP] New map of IP locations

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 15 Feb 2009 15:31:46 -0800

On Feb 15, 2009, at 3:17 PM, Stig Bjørlykke wrote:

I forgot to say this crash is on Ubuntu 8.10 Linux.
I don't have time to look at this right now, but I'll maybe have some
closer look later on.

(gdb) where
#0  0xb54a1ffe in fread () from /lib/tls/i686/cmov/libc.so.6
#1  0x08128512 in open_as_map_cb (copy_bt=0x9f29518, data=0x0)
   at /usr/include/bits/stdio2.h:287
#2  0xb59163d4 in g_cclosure_marshal_VOID__VOID ()
  from /usr/lib/libgobject-2.0.so.0

That was probably in the code to copy ipmap.html; it wasn't checking whether the open of the source or destination ipmap.html file succeeded.

As per the comment before that section of code, I took the copy_binary_file() routine in file.c and moved it to epan/ filesystem.c, renaming it to copy_file_binary_mode() (so it doesn't sound as if it's inappropriate for text files), and just used that to copy ipmap.html. copy_file_binary_mode() does error checking, so that case should be caught.