Introduce UNSAFE_TODO() macro.
Improve readability by avoiding distracting boilerplate comments.
-- tidy some other comments while at it.
Bug: pdfium:2154
Change-Id: Idaf43bc85bc17cb2738faa7b3deda1fd66ac67e7
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/119211
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_editimg.cpp b/fpdfsdk/fpdf_editimg.cpp
index ab75757..479c6eb 100644
--- a/fpdfsdk/fpdf_editimg.cpp
+++ b/fpdfsdk/fpdf_editimg.cpp
@@ -93,8 +93,7 @@
if (pages) {
for (int index = 0; index < count; index++) {
- // TODO(crbug.com/pdfium/2155): resolve safety issues.
- CPDF_Page* pPage = CPDFPageFromFPDFPage(UNSAFE_BUFFERS(pages[index]));
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(UNSAFE_TODO(pages[index]));
if (pPage) {
pImgObj->GetImage()->ResetCache(pPage);
}
@@ -175,8 +174,7 @@
if (pages) {
for (int index = 0; index < count; index++) {
- // TODO(crbug.com/pdfium/2155): resolve safety issues.
- CPDF_Page* pPage = CPDFPageFromFPDFPage(UNSAFE_BUFFERS(pages[index]));
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(UNSAFE_TODO(pages[index]));
if (pPage) {
pImgObj->GetImage()->ResetCache(pPage);
}