Text   |  XML   |  ReML   |   Visible Warnings:

Buffer Overrun  at strfuncs.c:39

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

checkpassword_setup_env

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/auth/db-checkpassword.c)expand/collapse
Show more  
 88  void checkpassword_setup_env(struct auth_request *request)
 89  {
 90          /* Besides passing the standard username and password in a 
 91             pipe, also pass some other possibly interesting information 
 92             via environment. Use UCSPI names for local/remote IPs. */
 93          env_put("PROTO=TCP"); /* UCSPI */
 94          env_put(t_strconcat("SERVICE=", request->service, NULL));
 95          if (request->local_ip.family != 0) {
 96                  env_put(t_strconcat("TCPLOCALIP=",
 97                                      net_ip2addr(&request->local_ip), NULL));
 98                  /* FIXME: for backwards compatibility only,
 99                     remove some day */
 100                  env_put(t_strconcat("LOCAL_IP=",
 101                                      net_ip2addr(&request->local_ip), NULL));
 102          }
 103          if (request->remote_ip.family != 0) {
 104                  env_put(t_strconcat("TCPREMOTEIP=",
 105                                      net_ip2addr(&request->remote_ip), NULL));
 106                  /* FIXME: for backwards compatibility only,
 107                     remove some day */
 108                  env_put(t_strconcat("REMOTE_IP=",
 109                                      net_ip2addr(&request->remote_ip), NULL));
 110          }
 111          if (request->local_port != 0) {
 112                  env_put(t_strdup_printf("TCPLOCALPORT=%u",
 113                                          request->local_port));
 114          }
 115          if (request->remote_port != 0) {
 116                  env_put(t_strdup_printf("TCPREMOTEPORT=%u",
 117[+][+]                                         request->remote_port));
expand/collapse

env_put

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/env-util.c)expand/collapse
Show more  
 15  void env_put(const char *env)
 16  {
 17          if (env_pool == NULL) {
 18                  env_pool = pool_alloconly_create(MEMPOOL_GROWING"Environment",
 19                                                   2048);
 20          }
 21[+]         if (putenv(p_strdup(env_pool, env)) != 0)
expand/collapse

p_strdup

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/strfuncs.c)expand/collapse
Show more  
 31  char *p_strdup(pool_t pool, const char *str)
 32  {
 33          void *mem;
 34          size_t len;
 35   
 36          if (str == NULL)
 37                  return NULL;
 38   
 39          for (len = 0; (str)[len] != '\0'; )
 40                  len++;
Show more  
Show more  
Show more  




Change Warning 7596.24794 : Buffer Overrun

Priority:
State:
Finding:
Owner:
Note: