pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] Stream backends and strncpy()


From: jemarch
Subject: Re: [pdf-devel] Stream backends and strncpy()
Date: Fri, 26 Sep 2008 21:13:58 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

   I've been all day testing the RunLength filter, and sadly the problem was 
that
   I found this, pdf-stm-be.c, line 278:
   ##
         /* Copy the data */
         strncpy ((char *) be->data.mem.buffer + be->data.mem.pos,
                  (char *) buffer,
                  written_bytes);
   ###

   We should use memcpy() because strncpy() mess with '\0' characters. :-/
   Here is a patch for that modification,

Applied to the trunk.
Thanks.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]