Changeset: 1b9a9b2be04e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b9a9b2be04e
Modified Files:
monetdb5/modules/mal/mat.c
Branch: Jan2014
Log Message:
Avoid dereference through NULL
diffs (20 lines):
diff --git a/monetdb5/modules/mal/mat.c b/monetdb5/modules/mal/mat.c
--- a/monetdb5/modules/mal/mat.c
+++ b/monetdb5/modules/mal/mat.c
@@ -266,9 +266,13 @@ MATpackSliceInternal(MalBlkPtr mb, MalSt
*/
if (lst <= cap + c) {
b = BATdescriptor(bid);
- bn = BATslice(b, fst - cap, lst - cap);
- BBPunfix(b->batCacheid);
- BBPkeepref(*ret = bn->batCacheid);
+ if( b){
+ bn = BATslice(b, fst - cap, lst - cap);
+ BBPunfix(b->batCacheid);
+ BBPkeepref(*ret = bn->batCacheid);
+ } else
+ throw(MAL, "mat.packSlice",
RUNTIME_OBJECT_MISSING);
+
return MAL_SUCCEED;
}
if (fst < cap + c) {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list