Patch for pdb_mysql and pdb_pgsql
Uli Meis
a.sporto at gmail.com
Wed Sep 28 13:15:20 GMT 2005
Hi!
On 9/28/05, Alexander Bokovoy <ab at samba.org> wrote:
>
> Why did you patch source/lib/talloc.c?
You probably missed my initial post on this, I'll just repeat the talloc
part:
--------------------
lib/talloc.c function talloc_vasprintf_append
https://bugzilla.samba.org/show_bug.cgi?id=3018
This corrects talloc_asprintf_append behavior.
Grep reveals it is only used in pdb_sql and lib/talloctort.c.
Without the patch the length of the argument to append to is not calculated
with strlen.
This brakes things like some_string[some_index]='\0';
Here a simple example I checked, result is ONE and not ONEFOUR:
query->part1 = talloc_asprintf(query,"ONE TWO THREE");
query->part1[3]='\0';
talloc_asprintf_append(query->part1,"FOUR");
greetings,
Uli
More information about the samba-technical
mailing list