git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff1ce65
)
ldb/ldb_controls: allow oid up to 255 chars
author
Stefan Metzmacher
<metze@samba.org>
Fri, 7 Oct 2011 07:56:17 +0000
(09:56 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 7 Oct 2011 10:20:48 +0000
(12:20 +0200)
We have char oid[256], so allow sscanf() to consume 255 chars.
metze
lib/ldb/common/ldb_controls.c
patch
|
blob
|
history
diff --git
a/lib/ldb/common/ldb_controls.c
b/lib/ldb/common/ldb_controls.c
index 42fabfc1856f4f043b45c064a72979f9daf1fa09..d4fc21f58edc2f473ec0dc299b78c996c7a1bbb1 100644
(file)
--- a/
lib/ldb/common/ldb_controls.c
+++ b/
lib/ldb/common/ldb_controls.c
@@
-949,7
+949,7
@@
struct ldb_control *ldb_parse_control_from_string(struct ldb_context *ldb, TALLO
oid[0] = '\0';
p = &(control_strings[10]);
- ret = sscanf(p, "%
64
[^:]:%d", oid, &crit);
+ ret = sscanf(p, "%
255
[^:]:%d", oid, &crit);
if ((ret != 2) || strlen(oid) == 0 || (crit < 0) || (crit > 1)) {
error_string = talloc_asprintf(mem_ctx, "invalid local_oid control syntax\n");