commit | 2c594794dda6b744299dbe322576eb5ef088033c | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Tue Aug 09 11:37:54 2016 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Tue Aug 09 14:03:36 2016 +0200 |
tree | ae5e4f2669a5d9e223deb7f3ec844d9197c72cba | |
parent | ad63582eb9bc57de6d74674025451780067a56a5 [diff] |
MINOR: sample: implement smp_is_safe() and smp_make_safe() These functions ensure that the designated sample is "safe for use", which means that its size is known, its length is correct regarding its size, and that strings are properly zero-terminated. smp_is_safe() only checks (and optionally sets the trailing zero when needed and possible). smp_make_safe() will call smp_dup() after smp_is_safe() fails.