s4:dsdb/schema: add dsdb_syntax_INT32_validate_ldb()
tridge at samba.org
tridge at samba.org
Wed Jan 13 15:20:51 MST 2010
Hi Metze,
Thanks for all of the great work you've been doing on ldb validation!
Some comments on ece3defd15246f232acaf0c2c29b66da2924438a
You use:
char buf[sizeof("-2147483648")];
and this test:
if (in->values[i].length >= sizeof(buf)) {
return WERR_DS_INVALID_ATTRIBUTE_SYNTAX;
}
That will fail if someone passes in a an integer of maximum size with
a nul termination byte. I think you should either add a +1 to the
sizeof(), or you could specifically check for nul termination (eg. use
strnlen(in->values[i].data, in->values[i].length) as the length to
test against).
Cheers, Tridge
More information about the samba-technical
mailing list