From c173eb19bf4f8e454ba6106d1290090c2292bfed Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 2 Sep 2016 11:56:02 +1000 Subject: [PATCH 1/2] ctdb-tools: CID 1125617 String not null terminated (STRING_NULL) BUG: https://bugzilla.samba.org/show_bug.cgi?id=12244 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit 19b4fb22a6c62d0f616c5a914f1510ae15677249) --- ctdb/tools/ctdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index a8e79ee..9df6b4e 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -4413,6 +4413,7 @@ static int control_dumpdbbackup(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, argv[0]); return ret; } + db_hdr.name[sizeof(db_hdr.name)-1] = '\0'; if (db_hdr.version != DB_VERSION) { fprintf(stderr, -- 2.7.4 From 3a8cf9188d6bec11e9ab953134ac3831330ad7e9 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 2 Sep 2016 13:23:36 +1000 Subject: [PATCH 2/2] ctdb-tests: CID 1125635 Dereference null return value (NULL_RETURNS) BUG: https://bugzilla.samba.org/show_bug.cgi?id=12244 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit bacdb2e0f8a5f75c21dd108635d700b59acf2791) --- ctdb/tests/src/rb_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctdb/tests/src/rb_test.c b/ctdb/tests/src/rb_test.c index e5c3de6..7dc0629 100644 --- a/ctdb/tests/src/rb_test.c +++ b/ctdb/tests/src/rb_test.c @@ -143,6 +143,7 @@ int main(int argc, const char *argv[]) */ for (i=0; i