| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
Enable the -Wlifetime-safety-permissive compiler flag to enforceIs there a bug report tasked with enabling this in Chromium as well? i.e. Will the BUILD.gn change become redundant at some point if this gets enabled by default in //build?
mutable DataVector<uint8_t> src_buf_;Maybe a slightly more descriptive name like "src_remainder_buf_"?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
Enable the -Wlifetime-safety-permissive compiler flag to enforceIs there a bug report tasked with enabling this in Chromium as well? i.e. Will the BUILD.gn change become redundant at some point if this gets enabled by default in //build?
Maybe. Didn't see an open on for Chrome, only V8, filed one for PDFium
Maybe a slightly more descriptive name like "src_remainder_buf_"?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: core/fpdfapi/page/cpdf_dib.cpp
Insertions: 6, Deletions: 6.
@@ -1091,9 +1091,9 @@
}
uint32_t src_pitch_value = src_pitch.value();
- // A fallback member buffer (src_buf_) is used as the backing store for
- // `pSrcLine` when the stream is truncated and the remaining bytes count
- // is less than `src_pitch_value`.
+ // A fallback member buffer is used as the backing store for `pSrcLine`
+ // when the stream is truncated and the remaining bytes count is less
+ // than `src_pitch_value`.
pdfium::span<const uint8_t> pSrcLine;
if (cached_bitmap_ && src_pitch_value <= cached_bitmap_->GetPitch()) {
@@ -1109,9 +1109,9 @@
if (remaining_bytes.size() >= src_pitch_value) {
pSrcLine = remaining_bytes.first(src_pitch_value);
} else {
- src_buf_ = DataVector<uint8_t>(src_pitch_value);
- fxcrt::Copy(remaining_bytes, src_buf_);
- pSrcLine = src_buf_;
+ src_remainder_buf_ = DataVector<uint8_t>(src_pitch_value);
+ fxcrt::Copy(remaining_bytes, src_remainder_buf_);
+ pSrcLine = src_remainder_buf_;
}
}
```
```
The name of the file: core/fpdfapi/page/cpdf_dib.h
Insertions: 1, Deletions: 1.
@@ -130,7 +130,7 @@
std::vector<DIB_COMP_DATA> comp_data_;
mutable DataVector<uint8_t> line_buf_;
mutable DataVector<uint8_t> mask_buf_;
- mutable DataVector<uint8_t> src_buf_;
+ mutable DataVector<uint8_t> src_remainder_buf_;
RetainPtr<CFX_DIBitmap> cached_bitmap_;
// Note: Must not create a cycle between CPDF_DIB instances.
RetainPtr<CPDF_DIB> mask_;
```
Add -Wlifetime-safety-permissive flag and fix CPDF_DIB lifetime warning.
Enable the -Wlifetime-safety-permissive compiler flag to enforce
lifetime safety checks.
Fix a lifetime issue in CPDF_DIB::GetScanline where a pointer to a
local temporary buffer could be returned when the stream is truncated.
The temporary buffer is replaced with a class member buffer.
The code path returning the temporary buffer is believed to be
dynamically unreachable. It requires a JPX image with less than 3
channels to trigger a width mismatch, but such images are forced to
the DeviceGray color space, which routes differently.
TAG=agy
CONV=35e67fbe-02d2-429f-9dbd-5e7fa8e5e9b6
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |