Commit 212812d8372d01362252bf2ac189c15367ff4f5c
1 parent
66c88995
Fix errors reported by Coverity
Thanks to Jiri Popelka from Red Hat for sending the output of a Coverity run over qpdf.
Showing
3 changed files
with
5 additions
and
1 deletions
libqpdf/QPDFObjectHandle.cc
libqpdf/QPDFWriter.cc
| ... | ... | @@ -70,6 +70,7 @@ QPDFWriter::init() |
| 70 | 70 | encryption_V = 0; |
| 71 | 71 | encryption_R = 0; |
| 72 | 72 | encryption_dict_objid = 0; |
| 73 | + pipeline = 0; | |
| 73 | 74 | next_objid = 1; |
| 74 | 75 | cur_stream_length_id = 0; |
| 75 | 76 | cur_stream_length = 0; |
| ... | ... | @@ -2695,7 +2696,7 @@ QPDFWriter::writeLinearized() |
| 2695 | 2696 | |
| 2696 | 2697 | this->next_objid = part4_first_obj; |
| 2697 | 2698 | enqueuePart(part4); |
| 2698 | - assert(this->next_objid = after_part4); | |
| 2699 | + assert(this->next_objid == after_part4); | |
| 2699 | 2700 | this->next_objid = part6_first_obj; |
| 2700 | 2701 | enqueuePart(part6); |
| 2701 | 2702 | assert(this->next_objid == after_part6); | ... | ... |
libtests/flate.cc
| ... | ... | @@ -46,6 +46,7 @@ void run(char const* filename) |
| 46 | 46 | // Write to the both pipeline |
| 47 | 47 | def3->write(buf, len); |
| 48 | 48 | } |
| 49 | + fclose(in1); | |
| 49 | 50 | |
| 50 | 51 | def1->finish(); |
| 51 | 52 | delete def1; |
| ... | ... | @@ -69,6 +70,7 @@ void run(char const* filename) |
| 69 | 70 | { |
| 70 | 71 | inf2->write(buf, len); |
| 71 | 72 | } |
| 73 | + fclose(in2); | |
| 72 | 74 | |
| 73 | 75 | inf2->finish(); |
| 74 | 76 | delete inf2; | ... | ... |