Commit d946ad6c3076073b9950df2ee25304c2d2a999ad
1 parent
20ca1e86
In Pl_TIFFPredictor::processRow buffer output
Showing
2 changed files
with
4 additions
and
2 deletions
libqpdf/Pl_TIFFPredictor.cc
| ... | ... | @@ -78,6 +78,7 @@ Pl_TIFFPredictor::processRow() |
| 78 | 78 | } |
| 79 | 79 | bw.flush(); |
| 80 | 80 | } else { |
| 81 | + out.clear(); | |
| 81 | 82 | auto next = cur_row.begin(); |
| 82 | 83 | auto cr_end = cur_row.end(); |
| 83 | 84 | auto pr_end = previous.end(); |
| ... | ... | @@ -93,10 +94,10 @@ Pl_TIFFPredictor::processRow() |
| 93 | 94 | new_sample += *prev; |
| 94 | 95 | *prev = new_sample; |
| 95 | 96 | } |
| 96 | - auto out = static_cast<unsigned char>(255U & new_sample); | |
| 97 | - p_next->write(&out, 1); | |
| 97 | + out.push_back(static_cast<unsigned char>(255U & new_sample)); | |
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | + p_next->write(out.data(), out.size()); | |
| 100 | 101 | } |
| 101 | 102 | } |
| 102 | 103 | ... | ... |
libqpdf/qpdf/Pl_TIFFPredictor.hh