Closed snakehaihai closed 1 year ago
In this code, there is a minor bug that can cause seg fault.
void Preprocess::give_feature(pcl::PointCloud<PointType> &pl, vector<orgtype> &types) { int plsize = pl.size(); int plsize2; if(plsize == 0) { printf("something wrong\n"); return; } uint head = 0; while(types[head].range < blind) { head++; }
Suggest add check before to prevent potential out-of-bounds access:
while (head < types.size() && types[head].range < blind) { head++; }
Thanks! I will fix it later.
In this code, there is a minor bug that can cause seg fault.
Suggest add check before to prevent potential out-of-bounds access: