Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at str.c:91

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

imap_id_args_get_log_reply

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-id.c)expand/collapse
Show more  
 128  const char *imap_id_args_get_log_reply(const struct imap_arg *args,
 129                                         const char *settings)
 130  {
 131          const char *const *keys, *key, *value;
 132          string_t *reply;
 133          bool log_all;
 134   
 135          if (settings == NULL || *settings == '\0' ||
 136              args->type != IMAP_ARG_LIST)
 137                  return NULL;
 138   
 139          args = IMAP_ARG_LIST_ARGS(args);
 140   
 141          log_all = strcmp(settings, "*") == 0;
 142[+]         reply = t_str_new(256);
 143          keys = t_strsplit_spaces(settings, " ");
 144          while (args->type != IMAP_ARG_EOL && args[1].type != IMAP_ARG_EOL) {
 145                  if (args->type != IMAP_ARG_STRING) {
 146                          /* broken input */
 147                          args += 2;
 148                          continue;
 149                  }
 150                  key = IMAP_ARG_STR_NONULL(args);
 151                  args++;
 152                  if (strlen(key) > 30) {
 153                          /* broken: ID spec requires fields to be max. 30 
 154                             octets */
 155                          args++;
 156                          continue;
 157                  }
 158   
 159                  if (log_all || str_array_icase_find(keys, key)) {
 160                          if (IMAP_ARG_TYPE_IS_STRING(args->type))
 161                                  value = IMAP_ARG_STR_NONULL(args);
 162                          else if (args->type == IMAP_ARG_NIL)
 163                                  value = "NIL";
 164                          else 
 165                                  value = "";
 166                          if (str_len(reply) > 0)
 167                                  str_append(reply, ", ");
 168                          str_append(reply, str_sanitize(key, 30));
 169                          str_append_c(reply, '=');
 170[+][+]                         str_append(reply, str_sanitize(value, 80));
expand/collapse

str_append

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/str.c)expand/collapse
Show more  
 89  void str_append(string_t *str, const char *cstr)
 90  {
 91          buffer_append(str, cstr, strlen(cstr));
Show more  
Show more  




Change Warning 7176.24643 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: