Fix segfault when attempting to use unsupported scope types in nrscope

Do not attempt to copy scope types >= MAX_SCOPE_TYPES in nrscope as it does
not support them at this point.
This commit is contained in:
Bartosz Podrygajlo
2024-09-05 15:21:07 +02:00
parent 8eb9e3d902
commit e1879c07bc
+3
View File
@@ -60,6 +60,9 @@ int end_forms(void) {
void copyData(void *scopeData, enum scopeDataType type, void *dataIn, int elementSz, int colSz, int lineSz, int offset, metadata *meta)
{
if (type >= MAX_SCOPE_TYPES) {
return;
}
scopeData_t *tmp = (scopeData_t *)scopeData;
if (tmp) {