The 'p' type is just a flag to mark the presence of a pointer,
not a real pointer itself.
The code is now the same as in Samba3's tdb_unpack.
Michael
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':
/* Return a malloc'ed string. */