mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Check for overflow wile decoding
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34833 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cdad5b9045
commit
956d76294e
1 changed files with 5 additions and 0 deletions
|
@ -545,6 +545,11 @@ static Class NSDataMallocClass;
|
|||
count = 0;
|
||||
for (;;)
|
||||
{
|
||||
if (count * 128 < count)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
format: @"overflow in array count"];
|
||||
}
|
||||
count *= 128;
|
||||
(*desImp)(src, desSel, &c, @encode(uint8_t), &cursor, nil);
|
||||
if (c & 128)
|
||||
|
|
Loading…
Reference in a new issue