mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
ranged_results: fix use of uninitialised variable (end)
This matches the range parsing in the search and callback - end was uninitilaised, causing occasional failures in make test. Andrew Bartlett (This used to be commit 669f137f0ecad10248a51b337c8f115d14d55b05)
This commit is contained in:
parent
24efc9fc36
commit
593e6fc403
@ -153,8 +153,10 @@ static int rr_search(struct ldb_module *module, struct ldb_request *req)
|
||||
if (strncasecmp(p, ";range=", strlen(";range=")) != 0) {
|
||||
continue;
|
||||
}
|
||||
if (sscanf(p, ";range=%u-*", &start) == 1) {
|
||||
} else if (sscanf(p, ";range=%u-%u", &start, &end) != 2) {
|
||||
if (sscanf(p, ";range=%u-%u", &start, &end) == 2) {
|
||||
} else if (sscanf(p, ";range=%u-*", &start) == 1) {
|
||||
end = (unsigned int)-1;
|
||||
} else {
|
||||
ldb_asprintf_errstring(module->ldb, "range request error: range requst malformed");
|
||||
return LDB_ERR_UNWILLING_TO_PERFORM;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user