On Wed, Sep 05, 2018 at 10:35:15AM +0200, Michael Becker wrote:
> Hi Bernhard,
> 
> here the backtrace with libsane-dbg installed:
> 
> (gdb) where
> #0  0x00007ffff6808f3b in __GI_raise (sig=sig@entry=6) at 
> ../sysdeps/unix/sysv/linux/raise.c:51
> #1  0x00007ffff680a2f1 in __GI_abort () at abort.c:79
> #2  0x00007ffff684b867 in __libc_message (action=do_abort, 
> fmt=fmt@entry=0x7ffff6955061 "*** %s ***: %s terminated\n")
> at ../sysdeps/posix/libc_fatal.c:181
> #3  0x00007ffff68dc49e in __GI___fortify_fail_abort 
> (need_backtrace=need_backtrace@entry=false,
> msg=msg@entry=0x7ffff695503f "stack smashing detected") at fortify_fail.c:33
> #4  0x00007ffff68dc462 in __stack_chk_fail () at stack_chk_fail.c:29
> #5  0x00007fffed5aff40 in Mustek_DMAWrite (size=size@entry=64, 
> lpdata=lpdata@entry=0x5555558eac20 "",
> chip=0x7fffed7cb8c0 <g_chip>) at mustek_usb2_asic.c:354
>...

static STATUS
Mustek_DMAWrite (PAsic chip, unsigned int size, SANE_Byte * lpdata)
{
...
  unsigned int buf[1];
...
      status =
        sanei_usb_write_bulk (chip->fd, lpdata + i * write_size,
                              (size_t *) buf);
...

sanei_usb_write_bulk() does write to its last parameter.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Reply via email to