The branch, master has been updated
       via  b86f44c s3:utils: Fix buffer size for snprintf and format string
       via  1c3b678 s3:torture: Fix spoolss test to build with -O3
       via  b5283c7 s4:samdb: Fix building Samba with -O3
      from  62d73f5 vfs_gpfs: handle EACCES when fetching DOS attributes from 
xattr

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b86f44cbd0b1fcaf39c9edec764ecef2fd6a863b
Author: Andreas Schneider <a...@samba.org>
Date:   Wed Aug 9 08:37:38 2017 +0200

    s3:utils: Fix buffer size for snprintf and format string
    
    GCC 7.1 produces an error:
    ‘snprintf’ output between 47 and 66 bytes into a destination of size 40
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>
    
    Autobuild-User(master): Ralph Böhme <s...@samba.org>
    Autobuild-Date(master): Wed Aug  9 13:37:47 CEST 2017 on sn-devel-144

commit 1c3b678e7dc7481cf2e97cdf136358d5fe53d9d3
Author: Andreas Schneider <a...@samba.org>
Date:   Wed Aug 9 08:23:29 2017 +0200

    s3:torture: Fix spoolss test to build with -O3
    
    Initialize variables so that we do not get a build warning that they
    might be used uninitilized.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>

commit b5283c70e3924730b567772105ec6056831a6b53
Author: Andreas Schneider <a...@samba.org>
Date:   Wed Aug 9 07:45:04 2017 +0200

    s4:samdb: Fix building Samba with -O3
    
    gcc error: ‘result’ may be used uninitialized
    
    This wont happen, because ldb will return and error, but the compiler
    doesn't understand this.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12930
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Ralph Boehme <s...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/utils/status_profile.c                  |  4 ++--
 source4/dsdb/samdb/ldb_modules/vlv_pagination.c |  2 +-
 source4/torture/rpc/spoolss.c                   | 11 ++++++-----
 3 files changed, 9 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/status_profile.c b/source3/utils/status_profile.c
index 109415d..829e84c 100644
--- a/source3/utils/status_profile.c
+++ b/source3/utils/status_profile.c
@@ -126,7 +126,7 @@ static uint64_t print_count_count_samples(
 
                if (buf[0] == '\0') {
                        snprintf(buf, buflen,
-                               "%s %ju/sec",
+                               "%-40s %ju/sec",
                                name, (uintmax_t)(step / delta_sec));
                } else {
                        printf("%-40s %s %ju/sec\n",
@@ -240,7 +240,7 @@ static uint64_t print_count_samples(
        uint64_t delta_usec)
 {
        uint64_t count = 0;
-       char buf[40] = { '\0', };
+       char buf[60] = { '\0', };
 
        if (delta_usec == 0) {
                return 0;
diff --git a/source4/dsdb/samdb/ldb_modules/vlv_pagination.c 
b/source4/dsdb/samdb/ldb_modules/vlv_pagination.c
index 5b744e3..980177c 100644
--- a/source4/dsdb/samdb/ldb_modules/vlv_pagination.c
+++ b/source4/dsdb/samdb/ldb_modules/vlv_pagination.c
@@ -436,7 +436,7 @@ static int vlv_results(struct vlv_context *ac)
                             ac->store->num_entries - 1);
 
                for (i = first_i; i <= last_i; i++) {
-                       struct ldb_result *result;
+                       struct ldb_result *result = NULL;
                        struct GUID *guid = &ac->store->results[i];
 
                        ret = vlv_search_by_dn_guid(ac->module, ac, &result, 
guid,
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 14a43b9..89e9a13 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -2667,8 +2667,8 @@ static bool test_EnumForms_find_one(struct 
torture_context *tctx,
                                    bool print_server,
                                    const char *form_name)
 {
-       union spoolss_FormInfo *info;
-       uint32_t count;
+       union spoolss_FormInfo *info = NULL;
+       uint32_t count = 0;
        bool found = false;
        int i;
 
@@ -5554,11 +5554,12 @@ static bool test_SetPrinterDataEx_values(struct 
torture_context *tctx,
 
        for (i=0; i < ARRAY_SIZE(values); i++) {
 
-               enum winreg_Type type;
-               DATA_BLOB blob_in, blob_out;
+               enum winreg_Type type = REG_NONE;
+               DATA_BLOB blob_in = data_blob_null;
+               DATA_BLOB blob_out = data_blob_null;
                uint32_t ecount;
                struct spoolss_PrinterEnumValues *einfo;
-               uint32_t needed;
+               uint32_t needed = 0;
 
                if (torture_setting_bool(tctx, "samba3", false)) {
                        char *q;


-- 
Samba Shared Repository

Reply via email to