libhfuzz/instrument: ignore const values which are of len=0
@@ -465,6 +465,9 @@ void instrumentClearNewCov() {
}
static inline void instrumentAddConstMemInternal(const void* mem, size_t len) {
+ if (len == 0) {
+ return;
+ }
if (len > sizeof(cmpFeedback->valArr[0].val)) {
len = sizeof(cmpFeedback->valArr[0].val);
}
@@ -494,6 +497,9 @@ void instrumentAddConstMem(const void* mem, size_t len, bool check_if_ro) {
if (!cmpFeedback) {
return;
}
+ if (len == 0) {
+ return;
+ }
if (check_if_ro && !util_isAddrRO(mem)) {
return;
}
