summaryrefslogtreecommitdiffstats
path: root/source/lib/talloc.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-01-14 06:15:07 +0000
committerMartin Pool <mbp@samba.org>2002-01-14 06:15:07 +0000
commitca233bc8b30d7d0626039b2769c4e1ae92dafd50 (patch)
treeb89d4613f6db47e7d89c662c3dc05d1247df5ee9 /source/lib/talloc.c
parente69a22290e5c923f31223906461df4874e3b2aac (diff)
downloadsamba-ca233bc8b30d7d0626039b2769c4e1ae92dafd50.tar.gz
samba-ca233bc8b30d7d0626039b2769c4e1ae92dafd50.tar.xz
samba-ca233bc8b30d7d0626039b2769c4e1ae92dafd50.zip
PSTRING_SANCTIFY:
If you define this, pstring and fstring become distinguished types, so that it's harder to accidentally overflow them by for example passing an fstring on the lhs of pstrcpy. The types are defined as one-element union arrays so that with "fstring f" the name "f" will be a pointer and with a big hammer you can cast it to (char *). So code that tries to just use it directly will get a loud warning, but hopefully nothing worse. To pass them to non-pstring-aware functions, use PSTR and check that the function takes a const. They should almost never be modified except by special calls. In those unusual cases, use PSTR_MUTABLE. This is off by default so as not to produce too many warnings. As the code is vetted it can become the default.
Diffstat (limited to 'source/lib/talloc.c')
0 files changed, 0 insertions, 0 deletions