Index: experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp |
=================================================================== |
--- experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp (revision 11117) |
+++ experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp (working copy) |
@@ -811,11 +811,15 @@ |
// skip white spaces |
start = skipPdfWhiteSpaces(level, start, end); |
+ if (start >= end) { |
+ return end; |
+ } |
+ |
current = endOfPdfToken(level, start, end); |
// no token, len would be 0 |
- if (current == start) { |
- return NULL; |
+ if (current == start || current == end) { |
+ return end; |
} |
int tokenLen = current - start; |