diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-03 12:16:16 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-05-03 07:37:07 +0200 |
commit | 2742ec0e34c06ded2885aa2607f1c1729a57b034 (patch) | |
tree | c10f1501c68c54ffc61c1f3545f7d272187b0aa2 /source4/torture | |
parent | 39081a20c5b570430e28866e34ae965c60ee2039 (diff) | |
download | samba-2742ec0e34c06ded2885aa2607f1c1729a57b034.tar.gz samba-2742ec0e34c06ded2885aa2607f1c1729a57b034.tar.bz2 samba-2742ec0e34c06ded2885aa2607f1c1729a57b034.zip |
Remove strlower_m() and strupper_m() from source4 and common code.
This function is problematic because a string may expand in size when
changed into upper or lower case. This will then push characters off
the end of the string in the s3 implementation, or panic in the former
s4 implementation.
Andrew Bartlett
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/masktest.c | 6 | ||||
-rw-r--r-- | source4/torture/winbind/struct_based.c | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/source4/torture/masktest.c b/source4/torture/masktest.c index 9c66291087..42665ab897 100644 --- a/source4/torture/masktest.c +++ b/source4/torture/masktest.c @@ -153,10 +153,8 @@ static void get_real_name(TALLOC_CTX *mem_ctx, struct smbcli_state *cli, listfn, &state); if (f_info_hit) { - *short_name = talloc_strdup(mem_ctx, last_hit.short_name); - strlower(*short_name); - *long_name = talloc_strdup(mem_ctx, last_hit.long_name); - strlower(*long_name); + *short_name = strlower_talloc(mem_ctx, last_hit.short_name); + *long_name = strlower_talloc(mem_ctx, last_hit.long_name); } if (*short_name == '\0') { diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c index aeb81c972c..2bab94088a 100644 --- a/source4/torture/winbind/struct_based.c +++ b/source4/torture/winbind/struct_based.c @@ -914,7 +914,6 @@ static bool parse_domain_user(struct torture_context *torture, fstrcpy(user, p+1); fstrcpy(domain, domuser); domain[PTR_DIFF(p, domuser)] = 0; - strupper_m(domain); return true; } |