The Samba-Bugzilla – Attachment 8241 Details for
Bug 9440
session reconnect can panic in dbwrap_watch_send
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
9440.patch (text/plain), 1.36 KB, created by
Volker Lendecke
on 2012-11-30 10:49:38 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Volker Lendecke
Created:
2012-11-30 10:49:38 UTC
Size:
1.36 KB
patch
obsolete
>From 83d626d83572f277396c337b617d3122919a268e Mon Sep 17 00:00:00 2001 >From: Volker Lendecke <vl@samba.org> >Date: Thu, 29 Nov 2012 16:45:15 +0100 >Subject: [PATCH] dbwrap: Fix bug 9440: Do not rely on dbwrap_record_get_value to return a talloc object > >db_tdb_fetch_locked returns the value as part of a larger talloc object >that also contains the key. This means we can not realloc, but have to >freshly alloc. > >Reviewed-by: Michael Adam <obnox@samba.org> > >Autobuild-User(master): Michael Adam <obnox@samba.org> >Autobuild-Date(master): Thu Nov 29 20:21:51 CET 2012 on sn-devel-104 >--- > source3/lib/dbwrap/dbwrap_watch.c | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c >index 701ac9d..d7392a3 100644 >--- a/source3/lib/dbwrap/dbwrap_watch.c >+++ b/source3/lib/dbwrap/dbwrap_watch.c >@@ -119,12 +119,13 @@ static NTSTATUS dbwrap_record_add_watcher(TDB_DATA w_key, struct server_id id) > ids = (struct server_id *)value.dptr; > num_ids = value.dsize / sizeof(struct server_id); > >- ids = talloc_realloc(talloc_tos(), ids, struct server_id, >- num_ids + 1); >+ ids = talloc_array(talloc_tos(), struct server_id, >+ num_ids + 1); > if (ids == NULL) { > status = NT_STATUS_NO_MEMORY; > goto fail; > } >+ memcpy(ids, value.dptr, value.dsize); > ids[num_ids] = id; > num_ids += 1; > >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
obnox
:
review-
Actions:
View
Attachments on
bug 9440
:
8241
|
8242