Hi,
when trying to use pxview with databases that have binary blobs in them, a stack smashing error gets generated. Example output below:
$ ./pxview.elf "/tmp/profoto/Profoto/profoto.db" -b /tmp/profoto/Profoto/profoto.MB -p img --blobextension=bmp -x -o index.htm
*** stack smashing detected ***: ./pxview.elf terminated
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(__fortify_fail+0x45)[0xb7690c75]
/lib/i386-linux-gnu/libc.so.6(+0xe8c27)[0xb7690c27]
/home/zoltanp/Desktop/profoto-dump/pxlib-0.6.5/../pxlib/lib/libpx.so.0(+0x11151)[0xb777f151]
/home/zoltanp/Desktop/profoto-dump/pxlib-0.6.5/../pxlib/lib/libpx.so.0(PX_open_blob_fp+0x3a7)[0xb7775d17]
/home/zoltanp/Desktop/profoto-dump/pxlib-0.6.5/../pxlib/lib/libpx.so.0(PX_open_blob_file+0x4e)[0xb7775dee]
./pxview.elf[0x804a00c]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xb75c1113]
./pxview.elf[0x804fb99]
======= Memory map: ========
08048000-08054000 r-xp 00000000 08:06 961263 /home/zoltanp/Desktop/profoto-dump/pxview.elf
08054000-08055000 r--p 0000b000 08:06 961263 /home/zoltanp/Desktop/profoto-dump/pxview.elf
..... cut the memory map ...
b77c6000-b77c7000 rw-p 0001e000 08:06 5720787 /lib/i386-linux-gnu/ld-2.13.so
bfbeb000-bfc0c000 rw-p 00000000 00:00 0 [stack]
Aborted
This happens on an Ubuntu 11.10 system, both with the pxlib from the distribution, and also with the pxlib compiled from source.
The system is:
$ uname -a
Linux e6pzoltanlaptop 3.0.0-25-generic-pae #41-Ubuntu SMP Mon Aug 13 18:20:25 UTC 2012 i686 i686 i386 GNU/Linux
An incorrect workaround I found is to recompile pxlib with stack smashing protection disabled, but that is not solving the main issue.
Versions 0.6.0, 0.6.4 and 0.6.5 all generate this error.
Unfortunately valgrind is not able to catch the source of this error.
The files that generate this error contain private data, so I'm not uploading them here; Feel free to contact me, and I can send a minimal crashing example.