diff options
author | Martin Pool <mbp@samba.org> | 2002-01-14 06:15:07 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2002-01-14 06:15:07 +0000 |
commit | 1b6c848c1063a2a99d0d7515a6b0af61e7c59cf3 (patch) | |
tree | aae2842e34b98d49b1bc4eaa516776c869fb18b7 /docs | |
parent | cb4658d41951cd612e0c88e2829f6e1f2fae30e1 (diff) | |
download | samba-1b6c848c1063a2a99d0d7515a6b0af61e7c59cf3.tar.gz samba-1b6c848c1063a2a99d0d7515a6b0af61e7c59cf3.tar.bz2 samba-1b6c848c1063a2a99d0d7515a6b0af61e7c59cf3.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.
(This used to be commit ca233bc8b30d7d0626039b2769c4e1ae92dafd50)
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions