Text   |  XML   |  ReML   |   Visible Warnings:

Uninitialized Variable  at rawlog.c:128

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

proxy_write_out

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/util/rawlog.c)expand/collapse
Show more  
 96  static void proxy_write_out(struct rawlog_proxy *proxy,
 97                              const void *data, size_t size)
 98  {
 99          struct tm *tm;
 100          char buf[256];
 101   
 102          if (proxy->fd_out == -1 || size == 0)
 103                  return;
 104   
 105          if (proxy->last_out_lf &&
 106              (proxy->flags & RAWLOG_FLAG_LOG_TIMESTAMPS) != 0 &&
 107              ioloop_time - proxy->last_write >= TIMESTAMP_WAIT_TIME) {
 108                  tm = localtime(&ioloop_time);
 109   
 110                  if (strftime(buf, sizeof(buf), TIMESTAMP_FORMAT, tm) <= 0)
 111                          i_fatal("strftime() failed");
 112                  if (write_full(proxy->fd_out, buf, strlen(buf)) < 0)
 113                          i_fatal("Can't write to log file: %m");
 114          }
 115   
 116          if ((proxy->flags & RAWLOG_FLAG_LOG_BOUNDARIES) != 0)
 117                  write_full(proxy->fd_out, "<<<", 3);
 118          if (write_full(proxy->fd_out, data, size) < 0) {
 119                  /* failed, disable logging */
 120                  i_error("write(out) failed: %m");
 121                  (void)close(proxy->fd_out);
 122                  proxy->fd_out = -1;
 123          } else if ((proxy->flags & RAWLOG_FLAG_LOG_BOUNDARIES) != 0) {
 124                  write_full(proxy->fd_out, ">>>\n", 4);
 125          }
 126   
 127          proxy->last_write = ioloop_time;
 128          proxy->last_out_lf = ((const unsigned char *)buf)[size-1] == '\n' ||
Show more  




Change Warning 8027.24496 : Uninitialized Variable

Priority:
State:
Finding:
Owner:
Note: