mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-30 04:37:50 +02:00
check identity buffer size
This commit is contained in:
parent
519330015f
commit
4c8d85870b
3 changed files with 19 additions and 5 deletions
|
@ -79,7 +79,7 @@ namespace data
|
|||
outCount = 4*n;
|
||||
else
|
||||
outCount = 4*(n+1);
|
||||
if (outCount > len) return -1;
|
||||
if (outCount > len) return 0;
|
||||
pd = (unsigned char *)OutBuffer;
|
||||
for ( i = 0; i<n; i++ ){
|
||||
acc_1 = *ps++;
|
||||
|
@ -158,7 +158,7 @@ namespace data
|
|||
outCount = 3*n;
|
||||
else {
|
||||
outCount = 0;
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ps = (unsigned char *)(InBuffer + InCount - 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue