Open MattiasOhmanSony opened 1 week ago
The current pattern matching will give false positives if only one character matches and it can lead to crashes. using break will exit the inner loop and advance the c_start index to the next character in the pData pointer and start the pattern matching again (i.e look for JSON) this is correct. Continue will not advance or restart the inner loop.
by using continue the loop does not restart the pattern matching and it can lead to that we get faulty indexes that in turn can lead to crashing. The correct code here is to break in the inner loop so we return to the outer loop.