diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/nttrans.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 05d9c82c38..1a43350e90 100644 --- a/source3/smbd/nttrans.c +++ b/source3/smbd/nttrans.c @@ -244,19 +244,6 @@ static int send_nt_replies(char *inbuf, char *outbuf, int bufsize, uint32 nt_err strings in NT calls AND DOESN'T SET THE UNICODE BIT !!!!!!! ****************************************************************************/ -static void my_wcstombs(char *dst, uint16 *src, size_t len) -{ - size_t i; - - for(i = 0; i < len; i++) - dst[i] = (char)SVAL(src,i*2); -} - -/**************************************************************************** - (Hopefully) temporary call to fix bugs in NT5.0beta2. This OS sends unicode - strings in NT calls AND DOESN'T SET THE UNICODE BIT !!!!!!! -****************************************************************************/ - static void get_filename( char *fname, char *inbuf, int data_offset, int data_len, int fname_len) { /* @@ -277,11 +264,11 @@ static void get_filename( char *fname, char *inbuf, int data_offset, int data_le fname_len = fname_len/2; if(data_offset & 1) data_offset++; - my_wcstombs( fname, (uint16 *)(inbuf+data_offset), fname_len); + pstrcpy(fname, dos_unistrn2((uint16 *)(inbuf+data_offset), fname_len)); } else { StrnCpy(fname,inbuf+data_offset,fname_len); + fname[fname_len] = '\0'; } - fname[fname_len] = '\0'; } /**************************************************************************** @@ -312,11 +299,11 @@ static void get_filename_transact( char *fname, char *inbuf, int data_offset, in fname_len = fname_len/2; if(data_offset & 1) data_offset++; - my_wcstombs( fname, (uint16 *)(inbuf+data_offset), fname_len); + pstrcpy(fname, dos_unistrn2((uint16 *)(inbuf+data_offset), fname_len)); } else { StrnCpy(fname,inbuf+data_offset,fname_len); + fname[fname_len] = '\0'; } - fname[fname_len] = '\0'; } /**************************************************************************** |