diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-03-27 12:38:45 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-03-27 12:38:45 +0000 |
commit | 426c90433396a95033eefcc4af97603abc934221 (patch) | |
tree | 1eb354b315679f9e93fc9acb1f47ebfba182f489 /source/include | |
parent | f6b56ae93e47a54317f2711533ec8208d5cbc8a9 (diff) | |
download | samba-426c90433396a95033eefcc4af97603abc934221.tar.gz |
changed the definition of dos_PutUniCode
the previous definition could result is us overflowing a buffer. The
null termination was always added yet the size returned did not
include the null termination.
the new function takes a BOOL null_terminate, and always returns the
total number of bytes consumed by the string.
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/proto.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/include/proto.h b/source/include/proto.h index 28dd32e4c51..19ad9b6f33c 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -477,7 +477,7 @@ char *string_truncate(char *s, int length); /*The following definitions come from lib/util_unistr.c */ -int dos_PutUniCode(char *dst,const char *src, ssize_t len); +int dos_PutUniCode(char *dst,const char *src, ssize_t len, BOOL null_terminate); void ascii_to_unistr(uint16 *dest, const char *src, int maxlen); void unistr_to_ascii(char *dest, const uint16 *src, int len); char *skip_unicode_string(char *buf,int n); |