mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
Fix overrun
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7772 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bf9a14edee
commit
723da3ed66
1 changed files with 8 additions and 0 deletions
|
@ -561,6 +561,10 @@ getCString_c(ivars self, char *buffer, unsigned int maxLength,
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
if (maxLength > self->_count)
|
||||||
|
{
|
||||||
|
maxLength = self->_count;
|
||||||
|
}
|
||||||
if (maxLength < aRange.length)
|
if (maxLength < aRange.length)
|
||||||
{
|
{
|
||||||
len = maxLength;
|
len = maxLength;
|
||||||
|
@ -590,6 +594,10 @@ getCString_u(ivars self, char *buffer, unsigned int maxLength,
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
if (maxLength > self->_count)
|
||||||
|
{
|
||||||
|
maxLength = self->_count;
|
||||||
|
}
|
||||||
if (maxLength < aRange.length)
|
if (maxLength < aRange.length)
|
||||||
{
|
{
|
||||||
len = maxLength;
|
len = maxLength;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue