Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at imap-quote.c:22

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

quota_send

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/plugins/imap-quota/imap-quota-plugin.c)expand/collapse
Show more  
 32  quota_send(struct client_command_context *cmd, struct mail_user *owner,
 33             struct quota_root *root)
 34  {
 35          const char *name, *const *list;
 36          string_t *str;
 37          unsigned int i;
 38          uint64_t value, limit;
 39          int ret;
 40   
 41          str = t_str_new(128);
 42          str_append(str, "* QUOTA ");
 43[+]         name = imap_quota_root_get_name(cmd->client->user, owner, root);
 44[+]         imap_quote_append_string(str, name, FALSE);
expand/collapse

imap_quote_append

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-imap/imap-quote.c)expand/collapse
Show more  
 7  void imap_quote_append(string_t *str, const unsigned char *value,
 8                         size_t value_len, bool compress_lwsp)
 9  {
 10          size_t i, extra = 0;
 11          bool last_lwsp = TRUE, literal = FALSE, modify = FALSE;
 12   
 13          if (value == NULL) {
 14                  str_append(str, "NIL");
 15                  return;
 16          }
 17   
 18          if (value_len == (size_t)-1)
 19                  value_len = strlen((const char *) value);
 20   
 21          for (i = 0; i < value_len; i++) {
 22                  switch (value[i]) {
 23                  case 0:
 24                          /* it's converted to 8bit char */
 25                          literal = TRUE;
 26                          modify = TRUE;
 27                          last_lwsp = FALSE;
 28                          break;
 29                  case '\t':
 30                          modify = TRUE;
 31                          /* fall through */
 32                  case ' ':
 33                          if (last_lwsp && compress_lwsp) {
 34                                  modify = TRUE;
 35                                  extra++;
 36                          }
 37                          last_lwsp = TRUE;
 38                          break;
 39                  case 13:
 40                  case 10:
 41                          extra++;
 42                          modify = TRUE;
 43                          break;
 44                  default:
 45                          if ((value[i] & 0x80) != 0 ||
 46                              value[i] == '"' || value[i] == '\\')
 47                                  literal = TRUE;
 48                          last_lwsp = FALSE;
Show more  
Show more  




Change Warning 8133.24858 : Buffer Overrun

Because they are very similar, this warning shares annotations with warning 8133.24862.

Priority:
State:
Finding:
Owner:
Note: