git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39f9c85
)
s3: avoid reading past the end of buffer in tdb_unpack 'f' if zero termination is...
author
Gregor Beck
<gbeck@sernet.de>
Tue, 5 Jul 2011 09:55:34 +0000
(11:55 +0200)
committer
Michael Adam
<obnox@samba.org>
Mon, 15 Aug 2011 15:15:14 +0000
(17:15 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
source3/lib/util_tdb.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_tdb.c
b/source3/lib/util_tdb.c
index 65e46119b4f7a4cc78ef26eb44e39d885013e04f..fb586f45d2f647ee13275e6a4710c32557c3cbdd 100644
(file)
--- a/
source3/lib/util_tdb.c
+++ b/
source3/lib/util_tdb.c
@@
-417,7
+417,7
@@
int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...)
break;
case 'f': /* null-terminated string */
s = va_arg(ap,char *);
- len = str
len((const char *)buf
) + 1;
+ len = str
nlen((const char *)buf, bufsize
) + 1;
if (bufsize < len || len > sizeof(fstring))
goto no_space;
memcpy(s, buf, len);