aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2016-05-06 07:30:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-06 07:30:13 -0700
commitebbdfe63a9643faa403f33282da9921427ca91eb (patch)
tree79fb18b9e50390ab9c2764cb20200a6eb1a57884 /src/pdf
parent055e192adc0072ae2548ef5431ceee652945f9c2 (diff)
SkAdvancedTypefaceMetrics: improve robustness
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkSinglyLinkedList.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pdf/SkSinglyLinkedList.h b/src/pdf/SkSinglyLinkedList.h
index c157c31d16..c7101141d6 100644
--- a/src/pdf/SkSinglyLinkedList.h
+++ b/src/pdf/SkSinglyLinkedList.h
@@ -18,6 +18,7 @@ public:
~SkSinglyLinkedList() { this->reset(); }
void reset() {
SkASSERT(fHead != nullptr || nullptr == fTail);
+ // Use a while loop rather than recursion to avoid stack overflow.
Node* node = fHead;
while (node) {
Node* next = node->fNext;