Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at istream.c:181

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

i_stream_create_seekable

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/istream-seekable.c)expand/collapse
Show more  
 270  struct istream *
 271  i_stream_create_seekable(struct istream *input[],
 272                           size_t max_buffer_size,
 273                           int (*fd_callback)(const char **path_r, void *context),
 274                           void *context)
 275  {
 276          struct seekable_istream *sstream;
 277          const unsigned char *data;
 278          unsigned int count;
 279          size_t size;
 280          bool blocking = TRUE;
 281   
 282          /* If all input streams are seekable, use concat istream instead */
 283          for (count = 0; input[count] != NULL; count++) {
 284                  if (!input[count]->seekable)
 285                          break;
 286          }
 287          if (input[count] == NULL)
 288[+]                 return i_stream_create_concat(input);
expand/collapse

i_stream_create_concat

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/istream-concat.c)expand/collapse
Show more  
 232  struct istream *i_stream_create_concat(struct istream *input[])
 233  {
 234          struct concat_istream *cstream;
 235          unsigned int count;
 236          size_t max_buffer_size = I_STREAM_MIN_SIZE;
 237          bool blocking = TRUE, seekable = TRUE;
 238   
 239          /* if any of the streams isn't blocking or seekable, set ourself also 
 240             nonblocking/nonseekable */
 241          for (count = 0; input[count] != NULL; count++) {
 242                  size_t cur_max = input[count]->real_stream->max_buffer_size;
 243   
 244                  if (cur_max > max_buffer_size)
 245                          max_buffer_size = cur_max;
 246                  if (!input[count]->blocking)
 247                          blocking = FALSE;
 248                  if (!input[count]->seekable)
 249                          seekable = FALSE;
 250                  i_stream_ref(input[count]);
 251          }
 252          i_assert(count != 0);
 253   
 254[+]         cstream = i_new(struct concat_istream, 1);
 255[+]         cstream->input = i_new(struct istream *, count + 1);
 256          cstream->input_size = i_new(uoff_t, count + 1);
 257   
 258          memcpy(cstream->input, input, sizeof(*input) * count);
 259          cstream->cur_input = cstream->input[0];
 260[+]         i_stream_seek(cstream->cur_input, 0);
expand/collapse

i_stream_seek

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/istream.c)expand/collapse
Show more  
 179  void i_stream_seek(struct istream *stream, uoff_t v_offset)
 180  {
 181          struct istream_private *_stream = stream->real_stream;
Show more  
Show more  
Show more  




Change Warning 12127.24555 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: