diff options
author | Jeremy Allison <jra@samba.org> | 2003-09-08 21:26:30 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-09-08 21:26:30 +0000 |
commit | 16e6d22408cd00852bc1a796815e77820d0df788 (patch) | |
tree | debcbfc7e344865a090ac5734364b1bd792d9731 /source3 | |
parent | 07c90e499e5e02db94d4ca3f3d303b2b1952ace9 (diff) | |
download | samba-16e6d22408cd00852bc1a796815e77820d0df788.tar.gz samba-16e6d22408cd00852bc1a796815e77820d0df788.tar.bz2 samba-16e6d22408cd00852bc1a796815e77820d0df788.zip |
Fix valgrind-found read of uninit variable (ensure length is right).
Jeremy.
(This used to be commit 6fc0e529f70253244628017a372257e8dc053294)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/charcnv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 5a922e226c..5f3cf64a68 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -270,7 +270,7 @@ size_t convert_string(charset_t from, charset_t to, break; } else { if (srclen == (size_t)-1) { - srclen = strlen(src)+1; + srclen = strlen(p)+1; } return retval + convert_string_internal(from, to, p, srclen, q, destlen); } @@ -296,7 +296,7 @@ size_t convert_string(charset_t from, charset_t to, break; } else { if (srclen == (size_t)-1) { - srclen = strlen_w(src)+2; + srclen = strlen_w((const void *)p)+2; } return retval + convert_string_internal(from, to, p, srclen, q, destlen); } @@ -322,7 +322,7 @@ size_t convert_string(charset_t from, charset_t to, break; } else { if (srclen == (size_t)-1) { - srclen = strlen(src)+1; + srclen = strlen(p)+1; } return retval + convert_string_internal(from, to, p, srclen, q, destlen); } |