Ignore:
Timestamp:
Nov 27, 2012, 4:56:06 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated vendor to 3.6.9

Location:
vendor/current/source3/registry
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/registry/reg_api.c

    r740 r746  
    9090        }
    9191
     92        TALLOC_FREE(key->values);
    9293        werr = regval_ctr_init(key, &(key->values));
    9394        W_ERROR_NOT_OK_RETURN(werr);
     
    116117        if (fetch_reg_keys(key->key, key->subkeys) == -1) {
    117118                TALLOC_FREE(key->subkeys);
    118                 return WERR_NO_MORE_ITEMS;
     119                return WERR_BADFILE;
    119120        }
    120121
     
    137138        struct registry_key *regkey;
    138139        struct registry_key_handle *key;
    139         struct regsubkey_ctr    *subkeys = NULL;
    140140
    141141        DEBUG(7,("regkey_open_onelevel: name = [%s]\n", name));
     
    151151        }
    152152
    153         if ( !(W_ERROR_IS_OK(result = regdb_open())) ) {
     153        result = regdb_open();
     154        if (!(W_ERROR_IS_OK(result))) {
    154155                goto done;
    155156        }
     
    194195        /* Look up the table of registry I/O operations */
    195196
    196         if ( !(key->ops = reghook_cache_find( key->name )) ) {
     197        key->ops = reghook_cache_find( key->name );
     198        if (key->ops == NULL) {
    197199                DEBUG(0,("reg_open_onelevel: Failed to assign "
    198200                         "registry_ops to [%s]\n", key->name ));
     
    201203        }
    202204
    203         /* check if the path really exists; failed is indicated by -1 */
    204         /* if the subkey count failed, bail out */
    205 
    206         result = regsubkey_ctr_init(key, &subkeys);
     205        /* FIXME: Existence is currently checked by fetching the subkeys */
     206
     207        result = fill_subkey_cache(regkey);
    207208        if (!W_ERROR_IS_OK(result)) {
    208209                goto done;
    209210        }
    210 
    211         if ( fetch_reg_keys( key, subkeys ) == -1 )  {
    212                 result = WERR_BADFILE;
    213                 goto done;
    214         }
    215 
    216         TALLOC_FREE( subkeys );
    217211
    218212        if ( !regkey_access_check( key, access_desired, &key->access_granted,
     
    257251        struct registry_key *direct_parent = parent;
    258252        WERROR err;
    259         char *p, *path, *to_free;
     253        char *p, *path;
    260254        size_t len;
    261 
    262         if (!(path = SMB_STRDUP(name))) {
    263                 return WERR_NOMEM;
    264         }
    265         to_free = path;
     255        TALLOC_CTX *frame = talloc_stackframe();
     256
     257        path = talloc_strdup(frame, name);
     258        if (path == NULL) {
     259                err = WERR_NOMEM;
     260                goto error;
     261        }
    266262
    267263        len = strlen(path);
     
    275271                struct registry_key *tmp;
    276272
    277                 if (!(name_component = SMB_STRNDUP(path, (p - path)))) {
     273                name_component = talloc_strndup(frame, path, (p - path));
     274                if (name_component == NULL) {
    278275                        err = WERR_NOMEM;
    279276                        goto error;
    280277                }
    281278
    282                 err = regkey_open_onelevel(mem_ctx, direct_parent,
     279                err = regkey_open_onelevel(frame, direct_parent,
    283280                                           name_component, parent->token,
    284281                                           KEY_ENUMERATE_SUB_KEYS, &tmp);
    285                 SAFE_FREE(name_component);
    286282
    287283                if (!W_ERROR_IS_OK(err)) {
    288284                        goto error;
    289285                }
    290                 if (direct_parent != parent) {
    291                         TALLOC_FREE(direct_parent);
    292                 }
    293286
    294287                direct_parent = tmp;
     
    298291        err = regkey_open_onelevel(mem_ctx, direct_parent, path, parent->token,
    299292                                   desired_access, pkey);
    300  error:
    301         if (direct_parent != parent) {
    302                 TALLOC_FREE(direct_parent);
    303         }
    304         SAFE_FREE(to_free);
     293
     294error:
     295        talloc_free(frame);
    305296        return err;
    306297}
     
    376367}
    377368
     369static WERROR reg_enumvalue_nocachefill(TALLOC_CTX *mem_ctx,
     370                                        struct registry_key *key,
     371                                        uint32 idx, char **pname,
     372                                        struct registry_value **pval)
     373{
     374        struct registry_value *val;
     375        struct regval_blob *blob;
     376
     377        if (!(key->key->access_granted & KEY_QUERY_VALUE)) {
     378                return WERR_ACCESS_DENIED;
     379        }
     380
     381        if (idx >= regval_ctr_numvals(key->values)) {
     382                return WERR_NO_MORE_ITEMS;
     383        }
     384
     385        blob = regval_ctr_specific_value(key->values, idx);
     386
     387        val = talloc_zero(mem_ctx, struct registry_value);
     388        if (val == NULL) {
     389                return WERR_NOMEM;
     390        }
     391
     392        val->type = regval_type(blob);
     393        val->data = data_blob_talloc(mem_ctx, regval_data_p(blob), regval_size(blob));
     394
     395        if (pname
     396            && !(*pname = talloc_strdup(
     397                         mem_ctx, regval_name(blob)))) {
     398                TALLOC_FREE(val);
     399                return WERR_NOMEM;
     400        }
     401
     402        *pval = val;
     403        return WERR_OK;
     404}
     405
    378406WERROR reg_queryvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
    379407                      const char *name, struct registry_value **pval)
     
    394422                blob = regval_ctr_specific_value(key->values, i);
    395423                if (strequal(regval_name(blob), name)) {
    396                         return reg_enumvalue(mem_ctx, key, i, NULL, pval);
     424                        /*
     425                         * don't use reg_enumvalue here:
     426                         * re-reading the values from the disk
     427                         * would change the indexing and break
     428                         * this function.
     429                         */
     430                        return reg_enumvalue_nocachefill(mem_ctx, key, i,
     431                                                         NULL, pval);
    397432                }
    398433        }
     
    523558        char *path, *end;
    524559        WERROR err;
    525 
    526         if (!(mem_ctx = talloc_new(ctx))) return WERR_NOMEM;
    527 
    528         if (!(path = talloc_strdup(mem_ctx, subkeypath))) {
     560        uint32_t access_granted;
     561
     562        mem_ctx = talloc_new(ctx);
     563        if (mem_ctx == NULL) {
     564                return WERR_NOMEM;
     565        }
     566
     567        path = talloc_strdup(mem_ctx, subkeypath);
     568        if (path == NULL) {
    529569                err = WERR_NOMEM;
     570                goto done;
     571        }
     572
     573        err = regdb_transaction_start();
     574        if (!W_ERROR_IS_OK(err)) {
     575                DEBUG(0, ("reg_createkey: failed to start transaction: %s\n",
     576                          win_errstr(err)));
    530577                goto done;
    531578        }
     
    540587                                    KEY_ENUMERATE_SUB_KEYS, &tmp, &action);
    541588                if (!W_ERROR_IS_OK(err)) {
    542                         goto done;
     589                        goto trans_done;
    543590                }
    544591
     
    561608                        *paction = REG_OPENED_EXISTING_KEY;
    562609                }
    563                 goto done;
     610                goto trans_done;
    564611        }
    565612
     
    568615                 * Something but "notfound" has happened, so bail out
    569616                 */
    570                 goto done;
     617                goto trans_done;
    571618        }
    572619
    573620        /*
    574          * We have to make a copy of the current key, as we opened it only
    575          * with ENUM_SUBKEY access.
     621         * We may (e.g. in the iteration) have opened the key with ENUM_SUBKEY.
     622         * Instead of re-opening the key with CREATE_SUB_KEY, we simply
     623         * duplicate the access check here and skip the expensive full open.
    576624         */
    577 
    578         err = reg_openkey(mem_ctx, key, "", KEY_CREATE_SUB_KEY,
    579                           &create_parent);
    580         if (!W_ERROR_IS_OK(err)) {
     625        if (!regkey_access_check(key->key, KEY_CREATE_SUB_KEY, &access_granted,
     626                                 key->token))
     627        {
     628                err = WERR_ACCESS_DENIED;
    581629                goto done;
    582630        }
     
    586634         */
    587635
    588         err = fill_subkey_cache(create_parent);
    589         if (!W_ERROR_IS_OK(err)) goto done;
    590 
    591636        err = create_reg_subkey(key->key, path);
    592         W_ERROR_NOT_OK_GOTO_DONE(err);
     637        if (!W_ERROR_IS_OK(err)) {
     638                goto trans_done;
     639        }
    593640
    594641        /*
     
    596643         */
    597644
    598         err = reg_openkey(ctx, create_parent, path, desired_access, pkey);
     645        err = reg_openkey(ctx, key, path, desired_access, pkey);
    599646        if (W_ERROR_IS_OK(err) && (paction != NULL)) {
    600647                *paction = REG_CREATED_NEW_KEY;
     648        }
     649
     650trans_done:
     651        if (W_ERROR_IS_OK(err)) {
     652                err = regdb_transaction_commit();
     653                if (!W_ERROR_IS_OK(err)) {
     654                        DEBUG(0, ("reg_createkey: Error committing transaction: %s\n", win_errstr(err)));
     655                }
     656        } else {
     657                WERROR err1 = regdb_transaction_cancel();
     658                if (!W_ERROR_IS_OK(err1)) {
     659                        DEBUG(0, ("reg_createkey: Error cancelling transaction: %s\n", win_errstr(err1)));
     660                }
    601661        }
    602662
     
    623683        W_ERROR_NOT_OK_GOTO_DONE(err);
    624684
     685        err = regdb_transaction_start();
     686        if (!W_ERROR_IS_OK(err)) {
     687                DEBUG(0, ("reg_deletekey: Error starting transaction: %s\n",
     688                          win_errstr(err)));
     689                goto done;
     690        }
     691
    625692        err = fill_subkey_cache(key);
    626         W_ERROR_NOT_OK_GOTO_DONE(err);
     693        W_ERROR_NOT_OK_GOTO(err, trans_done);
    627694
    628695        if (regsubkey_ctr_numkeys(key->subkeys) > 0) {
    629696                err = WERR_ACCESS_DENIED;
    630                 goto done;
     697                goto trans_done;
    631698        }
    632699
     
    638705                err = reg_openkey(mem_ctx, parent, name,
    639706                                  KEY_CREATE_SUB_KEY, &tmp_key);
    640                 W_ERROR_NOT_OK_GOTO_DONE(err);
     707                W_ERROR_NOT_OK_GOTO(err, trans_done);
    641708
    642709                parent = tmp_key;
     
    646713        if (name[0] == '\0') {
    647714                err = WERR_INVALID_PARAM;
    648                 goto done;
     715                goto trans_done;
    649716        }
    650717
    651718        err = delete_reg_subkey(parent->key, name);
     719
     720trans_done:
     721        if (W_ERROR_IS_OK(err)) {
     722                err = regdb_transaction_commit();
     723                if (!W_ERROR_IS_OK(err)) {
     724                        DEBUG(0, ("reg_deletekey: Error committing transaction: %s\n", win_errstr(err)));
     725                }
     726        } else {
     727                WERROR err1 = regdb_transaction_cancel();
     728                if (!W_ERROR_IS_OK(err1)) {
     729                        DEBUG(0, ("reg_deletekey: Error cancelling transaction: %s\n", win_errstr(err1)));
     730                }
     731        }
    652732
    653733done:
     
    667747        }
    668748
    669         if (!W_ERROR_IS_OK(err = fill_value_cache(key))) {
     749        err = regdb_transaction_start();
     750        if (!W_ERROR_IS_OK(err)) {
     751                DEBUG(0, ("reg_setvalue: Failed to start transaction: %s\n",
     752                          win_errstr(err)));
    670753                return err;
     754        }
     755
     756        err = fill_value_cache(key);
     757        if (!W_ERROR_IS_OK(err)) {
     758                DEBUG(0, ("reg_setvalue: Error filling value cache: %s\n", win_errstr(err)));
     759                goto done;
    671760        }
    672761
     
    676765            (regval_size(existing) == val->data.length) &&
    677766            (memcmp(regval_data_p(existing), val->data.data,
    678                     val->data.length) == 0)) {
    679                 return WERR_OK;
     767                    val->data.length) == 0))
     768        {
     769                err = WERR_OK;
     770                goto done;
    680771        }
    681772
     
    685776        if (res == 0) {
    686777                TALLOC_FREE(key->values);
    687                 return WERR_NOMEM;
     778                err = WERR_NOMEM;
     779                goto done;
    688780        }
    689781
    690782        if (!store_reg_values(key->key, key->values)) {
    691783                TALLOC_FREE(key->values);
    692                 return WERR_REG_IO_FAILURE;
    693         }
    694 
    695         return WERR_OK;
     784                DEBUG(0, ("reg_setvalue: store_reg_values failed\n"));
     785                err = WERR_REG_IO_FAILURE;
     786                goto done;
     787        }
     788
     789        err = WERR_OK;
     790
     791done:
     792        if (W_ERROR_IS_OK(err)) {
     793                err = regdb_transaction_commit();
     794                if (!W_ERROR_IS_OK(err)) {
     795                        DEBUG(0, ("reg_setvalue: Error committing transaction: %s\n", win_errstr(err)));
     796                }
     797        } else {
     798                WERROR err1 = regdb_transaction_cancel();
     799                if (!W_ERROR_IS_OK(err1)) {
     800                        DEBUG(0, ("reg_setvalue: Error cancelling transaction: %s\n", win_errstr(err1)));
     801                }
     802        }
     803
     804        return err;
    696805}
    697806
     
    717826        }
    718827
    719         if (!W_ERROR_IS_OK(err = fill_value_cache(key))) {
     828        err = regdb_transaction_start();
     829        if (!W_ERROR_IS_OK(err)) {
     830                DEBUG(0, ("reg_deletevalue: Failed to start transaction: %s\n",
     831                          win_errstr(err)));
    720832                return err;
     833        }
     834
     835        err = fill_value_cache(key);
     836        if (!W_ERROR_IS_OK(err)) {
     837                DEBUG(0, ("reg_deletevalue; Error filling value cache: %s\n",
     838                          win_errstr(err)));
     839                goto done;
    721840        }
    722841
    723842        err = reg_value_exists(key, name);
    724843        if (!W_ERROR_IS_OK(err)) {
    725                 return err;
     844                goto done;
    726845        }
    727846
     
    730849        if (!store_reg_values(key->key, key->values)) {
    731850                TALLOC_FREE(key->values);
    732                 return WERR_REG_IO_FAILURE;
    733         }
    734 
    735         return WERR_OK;
     851                err = WERR_REG_IO_FAILURE;
     852                DEBUG(0, ("reg_deletevalue: store_reg_values failed\n"));
     853                goto done;
     854        }
     855
     856        err = WERR_OK;
     857
     858done:
     859        if (W_ERROR_IS_OK(err)) {
     860                err = regdb_transaction_commit();
     861                if (!W_ERROR_IS_OK(err)) {
     862                        DEBUG(0, ("reg_deletevalue: Error committing transaction: %s\n", win_errstr(err)));
     863                }
     864        } else {
     865                WERROR err1 = regdb_transaction_cancel();
     866                if (!W_ERROR_IS_OK(err1)) {
     867                        DEBUG(0, ("reg_deletevalue: Error cancelling transaction: %s\n", win_errstr(err1)));
     868                }
     869        }
     870
     871        return err;
    736872}
    737873
  • vendor/current/source3/registry/reg_backend_db.c

    r740 r746  
    321321                /* preserve existing values across restarts. Only add new ones */
    322322
    323                 if (!regval_ctr_key_exists(values,
     323                if (!regval_ctr_value_exists(values,
    324324                                        builtin_registry_values[i].valuename))
    325325                {
     
    365365                                            builtin_registry_values[i].path,
    366366                                            values);
    367                 if (!regval_ctr_key_exists(values,
     367                if (!regval_ctr_value_exists(values,
    368368                                        builtin_registry_values[i].valuename))
    369369                {
     
    985985        }
    986986
    987         werr = WERR_OK;
     987        /*
     988         * Update the seqnum in the container to possibly
     989         * prevent next read from going to disk
     990         */
     991        werr = regsubkey_ctr_set_seqnum(store_ctx->ctr, db->get_seqnum(db));
    988992
    989993done:
     
    16121616        TALLOC_CTX *frame = talloc_stackframe();
    16131617        TDB_DATA value;
     1618        int seqnum[2], count;
    16141619
    16151620        DEBUG(11,("regdb_fetch_keys: Enter key => [%s]\n", key ? key : "NULL"));
     
    16211626        }
    16221627
    1623         werr = regsubkey_ctr_set_seqnum(ctr, db->get_seqnum(db));
     1628        werr = regsubkey_ctr_reinit(ctr);
    16241629        W_ERROR_NOT_OK_GOTO_DONE(werr);
    16251630
    1626         value = regdb_fetch_key_internal(db, frame, key);
     1631        count = 0;
     1632        ZERO_STRUCT(value);
     1633        seqnum[0] = db->get_seqnum(db);
     1634
     1635        do {
     1636                count++;
     1637                TALLOC_FREE(value.dptr);
     1638                value = regdb_fetch_key_internal(db, frame, key);
     1639                seqnum[count % 2] = db->get_seqnum(db);
     1640
     1641        } while (seqnum[0] != seqnum[1]);
     1642
     1643        if (count > 1) {
     1644                DEBUG(5, ("regdb_fetch_keys_internal: it took %d attempts to "
     1645                          "fetch key '%s' with constant seqnum\n",
     1646                          count, key));
     1647        }
     1648
     1649        werr = regsubkey_ctr_set_seqnum(ctr, seqnum[0]);
     1650        if (!W_ERROR_IS_OK(werr)) {
     1651                goto done;
     1652        }
    16271653
    16281654        if (value.dsize == 0 || value.dptr == NULL) {
     
    16391665                goto done;
    16401666        }
    1641 
    1642         werr = regsubkey_ctr_reinit(ctr);
    1643         W_ERROR_NOT_OK_GOTO_DONE(werr);
    16441667
    16451668        for (i=0; i<num_items; i++) {
     
    17081731                SAFE_FREE(data_p); /* 'B' option to tdb_unpack does a malloc() */
    17091732
    1710                 DEBUG(8,("specific: [%s], len: %d\n", valuename, size));
     1733                DEBUG(10, ("regdb_unpack_values: value[%d]: name[%s] len[%d]\n",
     1734                           i, valuename, size));
    17111735        }
    17121736
     
    17611785        TDB_DATA value;
    17621786        WERROR werr;
    1763 
    1764         DEBUG(10,("regdb_fetch_values: Looking for value of key [%s] \n", key));
     1787        int seqnum[2], count;
     1788
     1789        DEBUG(10,("regdb_fetch_values: Looking for values of key [%s]\n", key));
    17651790
    17661791        if (!regdb_key_exists(db, key)) {
     1792                DEBUG(10, ("regb_fetch_values: key [%s] does not exist\n",
     1793                           key));
     1794                ret = -1;
    17671795                goto done;
    17681796        }
     
    17731801        }
    17741802
    1775         werr = regval_ctr_set_seqnum(values, db->get_seqnum(db));
    1776         W_ERROR_NOT_OK_GOTO_DONE(werr);
    1777 
    1778         value = regdb_fetch_key_internal(db, ctx, keystr);
     1803        ZERO_STRUCT(value);
     1804        count = 0;
     1805        seqnum[0] = db->get_seqnum(db);
     1806
     1807        do {
     1808                count++;
     1809                TALLOC_FREE(value.dptr);
     1810                value = regdb_fetch_key_internal(db, ctx, keystr);
     1811                seqnum[count % 2] = db->get_seqnum(db);
     1812        } while (seqnum[0] != seqnum[1]);
     1813
     1814        if (count > 1) {
     1815                DEBUG(5, ("regdb_fetch_values_internal: it took %d attempts "
     1816                          "to fetch key '%s' with constant seqnum\n",
     1817                          count, key));
     1818        }
     1819
     1820        werr = regval_ctr_set_seqnum(values, seqnum[0]);
     1821        if (!W_ERROR_IS_OK(werr)) {
     1822                goto done;
     1823        }
    17791824
    17801825        if (!value.dptr) {
     
    18051850        NTSTATUS status;
    18061851        bool result = false;
    1807 
    1808         DEBUG(10,("regdb_store_values: Looking for value of key [%s] \n", key));
     1852        WERROR werr;
     1853
     1854        DEBUG(10,("regdb_store_values: Looking for values of key [%s]\n", key));
    18091855
    18101856        if (!regdb_key_exists(db, key)) {
     
    18471893
    18481894        status = dbwrap_trans_store_bystring(db, keystr, data, TDB_REPLACE);
    1849 
    1850         result = NT_STATUS_IS_OK(status);
     1895        if (!NT_STATUS_IS_OK(status)) {
     1896                DEBUG(0, ("regdb_store_values_internal: error storing: %s\n", nt_errstr(status)));
     1897                goto done;
     1898        }
     1899
     1900        /*
     1901         * update the seqnum in the cache to prevent the next read
     1902         * from going to disk
     1903         */
     1904        werr = regval_ctr_set_seqnum(values, db->get_seqnum(db));
     1905        result = W_ERROR_IS_OK(status);
    18511906
    18521907done:
  • vendor/current/source3/registry/reg_backend_smbconf.c

    r740 r746  
    8282}
    8383
     84static bool smbconf_subkeys_need_update(struct regsubkey_ctr *subkeys)
     85{
     86        return regdb_ops.subkeys_need_update(subkeys);
     87}
     88
     89static bool smbconf_values_need_update(struct regval_ctr *values)
     90{
     91        return regdb_ops.values_need_update(values);
     92}
    8493
    8594/*
     
    97106        .get_secdesc = smbconf_get_secdesc,
    98107        .set_secdesc = smbconf_set_secdesc,
     108        .subkeys_need_update = smbconf_subkeys_need_update,
     109        .values_need_update = smbconf_values_need_update,
    99110};
  • vendor/current/source3/registry/reg_format.c

    r740 r746  
    2525 */
    2626
     27#include "includes.h"
    2728#include "reg_format.h"
    2829#include "reg_parse.h"
     
    326327}
    327328
     329static bool is_zero_terminated_ucs2(const uint8_t* data, size_t len) {
     330        const size_t idx = len/sizeof(smb_ucs2_t);
     331        const smb_ucs2_t *str = (const smb_ucs2_t*)data;
     332
     333        if ((len % sizeof(smb_ucs2_t)) != 0) {
     334                return false;
     335        }
     336
     337        if (idx == 0) {
     338                return false;
     339        }
     340
     341        return (str[idx-1] == 0);
     342}
     343
    328344int reg_format_value(struct reg_format* f, const char* name, uint32_t type,
    329345                     const uint8_t* data, size_t len)
     
    334350        switch (type) {
    335351        case REG_SZ:
    336                 if (!(f->flags & REG_FMT_HEX_SZ)) {
     352                if (!(f->flags & REG_FMT_HEX_SZ)
     353                    && is_zero_terminated_ucs2(data, len))
     354                {
    337355                        char* str = NULL;
    338356                        size_t dlen;
  • vendor/current/source3/registry/reg_objects.c

    r740 r746  
    447447 **********************************************************************/
    448448
    449 bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value)
     449bool regval_ctr_value_exists(struct regval_ctr *ctr, const char *value)
    450450{
    451451        int     i;
     
    458458        return False;
    459459}
     460
     461/**
     462 * Get a value by its name
     463 */
     464struct regval_blob *regval_ctr_value_byname(struct regval_ctr *ctr,
     465                                            const char *value)
     466{
     467        int i;
     468
     469        for (i=0; i<ctr->num_values; i++) {
     470                if (strequal(ctr->values[i]->valuename,value)) {
     471                        return ctr->values[i];
     472                }
     473        }
     474
     475        return NULL;
     476}
     477
    460478
    461479/***********************************************************************
  • vendor/current/source3/registry/reg_objects.h

    r740 r746  
    5656struct regval_blob* regval_ctr_specific_value(struct regval_ctr *ctr,
    5757                                              uint32_t idx);
    58 bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value);
     58struct regval_blob *regval_ctr_value_byname(struct regval_ctr *ctr,
     59                                            const char *value);
     60bool regval_ctr_value_exists(struct regval_ctr *ctr, const char *value);
    5961struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
    6062                                   uint32_t type,
  • vendor/current/source3/registry/reg_parse.c

    r740 r746  
    794794                  (long unsigned)(linenum+1), pos));
    795795
    796         assert(ilen > 0);
     796        assert((*ilen) > 0);
    797797        do {
    798798                size_t il = 1;
    799799                DEBUGADD(0, ("<%02x>", (unsigned char)**iptr));
    800800
    801                 if (olen > 0) {
     801                if ((*olen) > 0) {
    802802                        *(*optr)++ = '\?';
    803803                        (*iptr)++;
  • vendor/current/source3/registry/regfio.c

    r740 r746  
    14681468                return NULL;
    14691469
    1470         memcpy( hbin->header, "hbin", sizeof(HBIN_HDR_SIZE) );
     1470        memcpy( hbin->header, "hbin", HBIN_HDR_SIZE);
    14711471
    14721472
Note: See TracChangeset for help on using the changeset viewer.