diff options
Diffstat (limited to 'source3/tdb/tdbutil.c')
-rw-r--r-- | source3/tdb/tdbutil.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c index 47f1bb2dc24..e27880e5ea0 100644 --- a/source3/tdb/tdbutil.c +++ b/source3/tdb/tdbutil.c @@ -566,7 +566,12 @@ int tdb_unpack(char *buf, int bufsize, const char *fmt, ...) p = va_arg(ap, void **); if (bufsize < len) goto no_space; - *p = (void *)IVAL(buf, 0); + /* + * This isn't a real pointer - only a token (1 or 0) + * to mark the fact a pointer is present. + */ + + *p = (void *)(IVAL(buf, 0) ? (void *)1 : NULL); break; case 'P': s = va_arg(ap,char *); |