Bug 1088 - smbclient: use strchr_m() for query_host instead of strchr()
Summary: smbclient: use strchr_m() for query_host instead of strchr()
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Extended Characters (show other bugs)
Version: 3.0.2
Hardware: Other other
: P3 normal
Target Milestone: none
Assignee: Gerald (Jerry) Carter (dead mail address)
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-16 22:39 UTC by SATOH Fumiyasu
Modified: 2005-08-24 10:19 UTC (History)
1 user (show)

See Also:


Attachments
Patch to fix this bug (1.83 KB, patch)
2004-02-16 22:48 UTC, SATOH Fumiyasu
no flags Details
2nd proposed patch (1.85 KB, patch)
2004-03-04 20:04 UTC, SATOH Fumiyasu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description SATOH Fumiyasu 2004-02-16 22:39:14 UTC
In source/client/client.c, remember_query_host() uses strchr() to truncate
query_host at '/' or '\\'. Because query_host possibly has multibyte character(s),
you must use strchr_m() instead of strchr().
Comment 1 SATOH Fumiyasu 2004-02-16 22:48:13 UTC
Created attachment 404 [details]
Patch to fix this bug

Because push_ucs2() called from strchr_m() calls convert_string(CH_UNIX,
CH_UCS2, ...), strchr_m() must be called after lp_load() (i.e. unix charset
was configured).
Comment 2 SATOH Fumiyasu 2004-03-04 20:04:13 UTC
Created attachment 426 [details]
2nd proposed patch
Comment 3 Gerald (Jerry) Carter (dead mail address) 2004-03-08 11:24:43 UTC
Looks ok to me.  Applied.  Thanks.
Comment 4 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:19:11 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.