Text   |  XML   |  ReML   |   Visible Warnings:

Unused Value  at mech-otp.c:107

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

mech_otp_auth_phase1

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/auth/mech-otp.c)expand/collapse
Show more  
 97  mech_otp_auth_phase1(struct auth_request *auth_request,
 98                       const unsigned char *data, size_t data_size)
 99  {
 100          struct otp_auth_request *request =
 101                  (struct otp_auth_request *)auth_request;
 102          const char *authzid, *authenid, *error;
 103          size_t i, count;
 104   
 105          /* authorization ID \0 authentication ID
 106             FIXME: we'll ignore authorization ID for now. */
 107          authzid = (const char *) data;
 108          authenid = NULL;
 109   
 110          count = 0;
 111          for (i = 0; i < data_size; i++) {
 112                  if (data[i] == '\0') {
 113                          if (++count == 1)
 114                                  authenid = (const char *) data + i + 1;
 115                  }
 116          }
 117   
 118          if ((count < 1) || (count > 2)) {
 119                  auth_request_log_error(&request->auth_request, "otp",
 120                                         "invalid input");
 121                  auth_request_fail(auth_request);
 122                  return;
 123          }
 124   
 125          if (!auth_request_set_username(auth_request, authenid, &error)) {
 126                  auth_request_log_info(auth_request, "otp", "%s", error);
 127                  auth_request_fail(auth_request);
 128                  return;
 129          }
 130   
 131          auth_request_lookup_credentials(auth_request, "OTP",
 132                                          otp_credentials_callback);
 133  }
Show more  




Change Warning 7636.25590 : Unused Value

Priority:
State:
Finding:
Owner:
Note: