The Samba-Bugzilla – Attachment 14091 Details for
Bug 13356
Fix bugs in client code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for 4.8.x
BZ13356-v4-8.patch (text/plain), 2.35 KB, created by
Amitay Isaacs
on 2018-03-28 07:03:53 UTC
(
hide
)
Description:
Patches for 4.8.x
Filename:
MIME Type:
Creator:
Amitay Isaacs
Created:
2018-03-28 07:03:53 UTC
Size:
2.35 KB
patch
obsolete
>From 7a5793c44d6619096c7c90020b08a5bb12d343ba Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Mon, 19 Mar 2018 13:38:28 +1100 >Subject: [PATCH 1/2] ctdb-client: Do not try to allocate 0 sized record > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13356 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> >(cherry picked from commit 92a68af1a8473dc2a5d9d6036830f944e968606d) >--- > ctdb/client/client_db.c | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > >diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c >index e86830e7bfb..a0c4cfed652 100644 >--- a/ctdb/client/client_db.c >+++ b/ctdb/client/client_db.c >@@ -1413,14 +1413,19 @@ struct ctdb_record_handle *ctdb_fetch_lock_recv(struct tevent_req *req, > offset = ctdb_ltdb_header_len(&h->header); > > data->dsize = h->data.dsize - offset; >- data->dptr = talloc_memdup(mem_ctx, h->data.dptr + offset, >- data->dsize); >- if (data->dptr == NULL) { >- TALLOC_FREE(state->h); >- if (perr != NULL) { >- *perr = ENOMEM; >+ if (data->dsize == 0) { >+ data->dptr = NULL; >+ } else { >+ data->dptr = talloc_memdup(mem_ctx, >+ h->data.dptr + offset, >+ data->dsize); >+ if (data->dptr == NULL) { >+ TALLOC_FREE(state->h); >+ if (perr != NULL) { >+ *perr = ENOMEM; >+ } >+ return NULL; > } >- return NULL; > } > } > >-- >2.14.3 > > >From 468a8f3c00075bfe7427373c3c46ac6748ea29d1 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Mon, 19 Mar 2018 13:58:43 +1100 >Subject: [PATCH 2/2] ctdb-client: Add missing initialization of tevent_context > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13356 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> >(cherry picked from commit 4e37be92bfb790150b3791bef552aa4acf8f78b7) >--- > ctdb/client/client_db.c | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c >index a0c4cfed652..c0ecdeb2d30 100644 >--- a/ctdb/client/client_db.c >+++ b/ctdb/client/client_db.c >@@ -1191,6 +1191,7 @@ struct tevent_req *ctdb_fetch_lock_send(TALLOC_CTX *mem_ctx, > if (tevent_req_nomem(state->h, req)) { > return tevent_req_post(req, ev); > } >+ state->h->ev = ev; > state->h->client = client; > state->h->db = db; > state->h->key.dptr = talloc_memdup(state->h, key.dptr, key.dsize); >-- >2.14.3 >
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:
martins
:
review+
Actions:
View
Attachments on
bug 13356
: 14091 |
14093