Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at master-settings.c:1697

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

settings_dump

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/master-settings.c)expand/collapse
Show more  
 1651  static void settings_dump(const struct setting_def *def, const void **sets,
 1652                            const char **set_names, unsigned int count,
 1653                            bool nondefaults, unsigned int indent)
 1654  {
 1655          const char **str;
 1656          unsigned int i;
 1657   
 1658[+]         str = t_new(const char *, count);
 1659          for (; def->name != NULL; def++) {
 1660                  bool same = TRUE;
 1661   
 1662                  switch (def->type) {
 1663                  case SET_STR: {
 1664                          const char *const *strp;
 1665   
 1666                          for (i = 0; i < count; i++) {
 1667                                  strp = CONST_PTR_OFFSET(sets[i], def->offset);
 1668                                  str[i] = *strp != NULL ? *strp : "";
 1669                          }
 1670                          break;
 1671                  }
 1672                  case SET_INT: {
 1673                          const unsigned int *n;
 1674   
 1675                          for (i = 0; i < count; i++) {
 1676                                  n = CONST_PTR_OFFSET(sets[i], def->offset);
 1677                                  str[i] = dec2str(*n);
 1678                          }
 1679                          break;
 1680                  }
 1681                  case SET_BOOL: {
 1682                          const bool *b;
 1683   
 1684                          for (i = 0; i < count; i++) {
 1685                                  b = CONST_PTR_OFFSET(sets[i], def->offset);
 1686                                  str[i] = *b ? "yes" : "no";
 1687                          }
 1688                          break;
 1689                  }
 1690                  }
 1691   
 1692                  for (i = 2; i < count; i++) {
 1693                          if (strcmp(str[i], str[i-1]) != 0)
 1694                                  same = FALSE;
 1695                  }
 1696                  if (same) {
 1697                          if (!nondefaults || strcmp(str[0], str[1]) != 0) {
Show more  




Change Warning 7861.24616 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: