check identity buffer size

This commit is contained in:
orignal 2014-12-04 19:28:20 -05:00
parent 519330015f
commit 4c8d85870b
3 changed files with 19 additions and 5 deletions

View file

@ -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);