We must not allow negative color values be passed to gdImageFillToBorder(), because that can lead to infinite recursion since the recursion termination condition will not necessarily be met. (cherry picked from commit 863d37ea66)
863d37ea66