Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at log.c:135

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

log_close

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/log.c)expand/collapse
Show more  
 251  static void log_close(struct log_io *log_io)
 252  {
 253          const unsigned char *data;
 254          size_t size;
 255   
 256          if (log_io->destroying)
 257                  return;
 258   
 259          /* if there was something in buffer, write it */
 260          log_io->destroying = TRUE;
 261          (void)log_write_pending(log_io);
 262   
 263          /* write partial data as well */
 264[+]         data = i_stream_get_data(log_io->stream, &size);
 265          if (size != 0) {
 266                  T_BEGIN {
 267[+][+]                         log_it(log_io, t_strndup(data, size), TRUE);
expand/collapse

log_it

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/log.c)expand/collapse
Show more  
 97  static int log_it(struct log_io *log_io, const char *line, bool continues)
 98  {
 99          struct child_process *process;
 100          const char *prefix;
 101          enum log_type log_type;
 102   
 103          if (log_io->next_log_type == '\0') {
 104                  if (line[0] == 1 && line[1] != '\0') {
 105                          /* our internal protocol.
 106                             \001 + log_type */
 107                          log_io->next_log_type = line[1];
 108                          line += 2;
 109                  } else {
 110                          log_io->next_log_type = 'E';
 111                  }
 112          }
 113   
 114          prefix = log_io->prefix != NULL ? log_io->prefix : "";
 115          switch (log_io->next_log_type) {
 116          case 'I':
 117                  log_type = LOG_TYPE_INFO;
 118                  break;
 119          case 'W':
 120                  log_type = LOG_TYPE_WARNING;
 121                  break;
 122          case 'E':
 123                  log_type = LOG_TYPE_ERROR;
 124                  break;
 125          case 'F':
 126          case 'P':
 127                  log_type = log_io->next_log_type == 'F' ?
 128                          LOG_TYPE_FATAL : LOG_TYPE_PANIC;
 129                  process = child_process_lookup(log_io->pid);
 130                  if (process != NULL)
 131                          process->seen_fatal = TRUE;
 132                  break;
 133          case 'O':
 134                  /* logging option. ignore unknown ones. */
 135                  if (strncmp(line, "ip=", 3) == 0) {
Show more  
Show more  




Change Warning 7723.24741 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: