[Valgrind-users] Invalid read raised with stpncpy

2012-08-12 Thread Francis Giraldeau
, and that it's safe to read those 8 bytes? Thanks! Francis Giraldeau smime.p7s Description: Signature cryptographique S/MIME -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security

Re: [Valgrind-users] Invalid read raised with stpncpy

2012-08-12 Thread Francis Giraldeau
Le 2012-08-12 17:41, songbird a écrit : Francis Giraldeau wrote: ... Hi, Valgrind reports an invalid read, while I think the program is valid. The program uses stpncpy() instead of strcpy(): #include string.h #include stdlib.h #include stdio.h int main(int argc, char **argv

Re: [Valgrind-users] Invalid read raised with stpncpy

2012-08-12 Thread Francis Giraldeau
Le 2012-08-12 18:56, Philippe Waroquiers a écrit : On Sun, 2012-08-12 at 18:10 +0200, Francis Giraldeau wrote: Of course you are right! Thought, I just tested without updating dst and the problem is raised anyway. The error is not caused in the printf(), but in the stpncpy(). String functions