Fixed a buffer overflow in wcsncpy.

svn path=/trunk/; revision=3919
This commit is contained in:
Hartmut Birr 2003-01-02 16:05:50 +00:00
parent 0b2f407fd4
commit 7d15711868
3 changed files with 3 additions and 5 deletions

View file

@ -12,7 +12,6 @@ wchar_t * wcsncpy(wchar_t * dest,const wchar_t *src,size_t count)
return(dest);
}
}
dest[i]=0;
return(dest);
}

View file

@ -1,4 +1,4 @@
/* $Id: wstring.c,v 1.7 2000/02/05 23:45:46 ekohl Exp $
/* $Id: wstring.c,v 1.8 2003/01/02 16:05:50 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -200,7 +200,6 @@ wchar_t* wcsncpy(wchar_t *dest, const wchar_t *src, size_t count)
return dest;
}
}
dest[i] = 0;
return dest;
}

View file

@ -1,4 +1,5 @@
/*
/* $Id: wstring.c,v 1.18 2003/01/02 16:05:50 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/rtl/wstring.c
@ -234,7 +235,6 @@ wchar_t *wcsncpy(wchar_t *dest, const wchar_t *src, size_t count)
return dest;
}
}
dest[i] = 0;
return dest;
}