Nope.
info strncpy sez:
This function is similar to `strcpy' but always copies exactly
SIZE characters into TO.
If the length of FROM is more than SIZE, then `strncpy' copies
just the first SIZE characters. Note that in this case there is
no null terminator written into TO.
If the length of FROM is less than SIZE, then `strncpy' copies all
of FROM, followed by enough null characters to add up to SIZE
characters in all. This behavior is rarely useful, but it is
specified by the ISO C standard.
So, if the row contains nulls, or db_get_length return value bigger than the
actual string length, msgbuf_buf is filled with nulls, correct?
Ilja Booij wrote:
On Wed, 2004-04-14 at 11:36, Paul J Stevens wrote:
Perhaps db_init_fetch could strip trailing NULLs from resulting rows to allow
current users of 2.0 to retreive messages that were inserted with the parser bug
still in place.
I'd think that the NULLs would get stripped from the message because the
string copy functions, which should stop after encountering a NULL,
shouldn't they?
Ilja
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
--
________________________________________________________________
Paul Stevens [EMAIL PROTECTED]
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl