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

userdb_static_template_export

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/auth/userdb-static.c)expand/collapse
Show more  
 100  void userdb_static_template_export(struct userdb_static_template *tmpl,
 101                                     struct auth_request *auth_request)
 102  {
 103          const struct var_expand_table *table;
 104          string_t *str;
 105          const char *const *args, *value;
 106          unsigned int i, count;
 107   
 108          str = t_str_new(256);
 109[+]         table = auth_request_get_var_expand_table(auth_request, NULL);
 110   
 111[+]         args = array_get(&tmpl->args, &count);
 112          i_assert((count % 2) == 0);
 113          for (i = 0; i < count; i += 2) {
 114                  if (args[i+1] == NULL)
 115                          value = NULL;
 116                  else {
 117                          str_truncate(str, 0);
 118                          var_expand(str, args[i+1], table);
 119                          value = str_c(str);
 120                  }
 121[+]                 auth_request_set_userdb_field(auth_request, args[i], value);
expand/collapse

auth_request_set_userdb_field

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/auth/auth-request.c)expand/collapse
Show more  
 1147  void auth_request_set_userdb_field(struct auth_request *request,
 1148                                     const char *name, const char *value)
 1149  {
 1150          uid_t uid;
 1151          gid_t gid;
 1152   
 1153          if (strcmp(name, "uid") == 0) {
 1154                  uid = userdb_parse_uid(request, value);
 1155                  if (uid == (uid_t)-1) {
 1156                          request->userdb_lookup_failed = TRUE;
 1157                          return;
 1158                  }
 1159                  value = dec2str(uid);
 1160          } else if (strcmp(name, "gid") == 0) {
 1161                  gid = userdb_parse_gid(request, value);
 1162                  if (gid == (gid_t)-1) {
 1163                          request->userdb_lookup_failed = TRUE;
 1164                          return;
 1165                  }
 1166                  value = dec2str(gid);
 1167          } else if (strcmp(name, "user") == 0) {
 1168                  auth_request_change_userdb_user(request, value);
 1169                  return;
 1170          } else if (strcmp(name, "uidgid_file") == 0) {
 1171                  auth_request_set_uidgid_file(request, value);
 1172                  return;
 1173          } else if (strcmp(name, "userdb_import") == 0) {
 1174[+]                 auth_stream_reply_import(request->userdb_reply, value);
expand/collapse

auth_stream_reply_import

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/auth/auth-stream.c)expand/collapse
Show more  
 92  void auth_stream_reply_import(struct auth_stream_reply *reply, const char *str)
 93  {
 94          if (str_len(reply->str) > 0)
 95                  str_append_c(reply->str, '\t');
 96[+]         str_append(reply->str, str);
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  
Show more  
Show more  




Change Warning 7707.24897 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: