comparison cli-auth.c @ 1173:d734fe76b72f coverity

merge
author Matt Johnston <matt@ucc.asn.au>
date Mon, 23 Nov 2015 23:04:48 +0800
parents a8f4dade70e5
children c6346c63281b
comparison
equal deleted inserted replaced
1144:624fc24cfae5 1173:d734fe76b72f
322 } 322 }
323 TRACE(("leave cli_auth_try failure")) 323 TRACE(("leave cli_auth_try failure"))
324 return DROPBEAR_FAILURE; 324 return DROPBEAR_FAILURE;
325 } 325 }
326 326
327 #if defined(ENABLE_CLI_PASSWORD_AUTH) || defined(ENABLE_CLI_INTERACT_AUTH)
327 /* A helper for getpass() that exits if the user cancels. The returned 328 /* A helper for getpass() that exits if the user cancels. The returned
328 * password is statically allocated by getpass() */ 329 * password is statically allocated by getpass() */
329 char* getpass_or_cancel(char* prompt) 330 char* getpass_or_cancel(char* prompt)
330 { 331 {
331 char* password = NULL; 332 char* password = NULL;
345 if (password == NULL || strchr(password, '\3') != NULL) { 346 if (password == NULL || strchr(password, '\3') != NULL) {
346 dropbear_close("Interrupted."); 347 dropbear_close("Interrupted.");
347 } 348 }
348 return password; 349 return password;
349 } 350 }
351 #endif