* the test program has a bug, too: add "return EXIT_FAILURE" to the
(argc < 2) condition.
* a more detailed backtrace:
Program received signal SIGSEGV, Segmentation fault.
0xb7ea377d in memset () from /lib/tls/libc.so.6
(gdb) bt
#0 0xb7ea377d in memset () from /lib/tls/libc.so.6
#1 0xb7f7f16d in apprentice_file (ms=0x804a008, magicp=0xbfca7ad4,
nmagicp=0xbfca7ad0, fn=0x804a888 "/opt/mad/lib/libg3d/libg3d.magic",
action=2) at apprentice.c:567
#2 0xb7f806aa in file_apprentice (ms=0x804a008,
fn=0x804a888 "/opt/mad/lib/libg3d/libg3d.magic", action=2)
at apprentice.c:171
#3 0xb7f7e672 in magic_compile (ms=0x804a008,
magicfile=0xbfca889d "/opt/mad/lib/libg3d/libg3d.magic") at magic.c:168
#4 0x080486fd in main ()
The memset which explodes is in the private function parse(). I changed
the test program to initialize the allocated buffer with 0xf5, the pointer
which should be memset() is - surprise - 0xf5f5f5f5. So there is an
initialization missing somewhere...
Markus
--
BOFH excuse #150: Some one needed the powerstrip, so they pulled the switch
plug.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]