There are two reasons for the orange overflow:
- snprintf() can return a very large number.
- myfunc() can be called 0 or more times, upto a very large number. There is no main() function which would indicate how many times myfunc() is called (that is, your application is not complete).
By applying DRS, you have constrained the return value of snprint(). But even if snprintf() returns something in a small range like 0..100, myfunc() can still be called 0 or more times.
Now the question is: do you want to get rid of the orange overflow or make your function robust to overflows? Just based on your code snippet, Polyspace is making sound assumptions and showing that the function is not robust to overflows. Any external constraint you apply would assume that you have some foreknowledge outside the code.
Since you are applying DRS, I will go with the assumption that you somehow have this foreknowledge. You can then also constrain the number of times myfunc() can be called. There is no way to do this directly in the user interface, but you can add a file to your Polyspace project with lines like this (this code snippet is saying that myfunc() is called upto 10 times):
int generateRandomNumber();
int counter_max = generateRandomNumber();
assert(counter_max > 0 && counter_max <=10);
for(int i = 0; i < counter_max; i++)
Name the file polyspace_main.cpp or whatever and add it to the analysis along with your current source (and also apply DRS on the return of snprint). Now, the overflow should go away, because you have constrained both aspects of the overflow.