ref: f4801f3276a9088dd805684316c304017cd6488f
parent: 8b659ea4c3bb1eea2caad4865b77bf821353a087
author: Yaroslav Kolomiiets <[email protected]>
date: Fri Aug 19 11:25:09 EDT 2016
getshareT: complete bounds checks
--- a/mpas.c
+++ b/mpas.c
@@ -225,8 +225,6 @@
}
ep = p+ulenr;
}
-
- /* BUG add more boundary checks */
switch (pduType2){
case ADsync:
@@ -240,6 +238,10 @@
break;
case ADerrx:
/* 2.2.5.1.1 Set Error Info PDU Data (TS_SET_ERROR_INFO_PDU) */
+ if(p+4 > ep){
+ werrstr("ADdraw: %s", Eshort);
+ return -1;
+ }
as->type = ShEinfo;
as->err = GLONG(p);
break;