Null Test After Dereference at istream-seekable.c:117 |
No properties have been set. edit properties |
Jump to warning location ↓ | warning details... |
| |
read_more (/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/istream-seekable.c)![]() | ||||||
![]() | ||||||
97 | static ssize_t read_more(struct seekable_istream *sstream) | |||||
98 | { | |||||
99 | size_t size; | |||||
100 | ssize_t ret; | |||||
101 | ||||||
102 | if (sstream->cur_input == NULL) { | |||||
103 | sstream->istream.istream.eof = TRUE; | |||||
104 | return -1; | |||||
105 | } | |||||
106 | ||||||
107 | while ((ret = i_stream_read(sstream->cur_input)) < 0) { | |||||
108 | if (!sstream->cur_input->eof) { | |||||
109 | /* full / error */ | |||||
110 | sstream->istream.istream.stream_errno = | |||||
111 | sstream->cur_input->stream_errno; | |||||
112 | return ret; | |||||
113 | } | |||||
114 | ||||||
115 | /* go to next stream */ | |||||
116 | sstream->cur_input = sstream->input[sstream->cur_idx++]; | |||||
117 | if (sstream->cur_input == NULL) {
| |||||
118 | /* last one, EOF */ | |||||
119 | sstream->istream.istream.eof = TRUE; | |||||
120 | return -1; | |||||
121 | } | |||||
122 | ||||||
123 | /* see if stream has pending data */ | |||||
124 | (void)i_stream_get_data(sstream->cur_input, &size); | |||||
125 | if (size != 0) | |||||
126 | return size; | |||||
127 | } | |||||
128 | return ret; | |||||
129 | } | |||||
![]() |