Revert "libcli: Overflow array index read possible, in auth code."
authorIra Cooper <ira@samba.org>
Mon, 24 Feb 2014 08:46:00 +0000 (14:16 +0530)
committerIra Cooper <ira@samba.org>
Mon, 24 Feb 2014 08:46:00 +0000 (14:16 +0530)
This reverts commit 538cbfe0e90b7c7ed0f8421b323cac4dacd83f04.

Signed-off-by: Ira Cooper <ira@samba.org>
libcli/auth/netlogon_creds_cli.c

index 7e882552c94f629caaded512a228725d3c32514e..d73335da1d62906872189e163e18e642fed383ec 100644 (file)
@@ -1766,8 +1766,8 @@ struct tevent_req *netlogon_creds_cli_ServerPasswordSet_send(TALLOC_CTX *mem_ctx
 
        if (new_version != NULL) {
                struct NL_PASSWORD_VERSION version;
-               int32_t len = IVAL(state->samr_crypt_password.data, 512);
-               int32_t ofs = 512 - len;
+               uint32_t len = IVAL(state->samr_crypt_password.data, 512);
+               uint32_t ofs = 512 - len;
                uint8_t *p;
 
                if (ofs < 12) {