1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s4-smbtorture: add more paranoid checks for REG_DWORD SetPrinterDataEx tests.

Guenther
This commit is contained in:
Günther Deschner 2010-03-05 00:56:52 +01:00
parent 65f453ce71
commit c5fb6551d9

View File

@ -3290,7 +3290,6 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx,
REG_DWORD,
REG_BINARY
};
uint32_t value = 12345678;
const char *str = "abcdefghijklmnopqrstuvwxzy";
int i, t, s;
@ -3309,20 +3308,12 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx,
uint8_t *data_out;
uint32_t needed, offered = 0;
if (types[t] == REG_DWORD) {
s = 0xffff;
}
switch (types[t]) {
case REG_BINARY:
case REG_DWORD:
data = blob;
offered = blob.length;
break;
case REG_DWORD:
data = data_blob(NULL, 4);
SIVAL(data.data, 0, value);
offered = 4;
break;
case REG_SZ:
torture_assert(tctx,
reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),