mirror of
https://github.com/mirror/wget.git
synced 2025-01-06 02:10:28 +08:00
Remove illogical assertion in ftp.c
A call to assert(1) will always fail and cause Wget to crash. If such a situation does arise, Wget should invoke abort() and provide a useful error message to the user prior to exiting.
This commit is contained in:
parent
4b845615fa
commit
aaefe8bc83
@ -1,3 +1,7 @@
|
||||
2014-12-04 Darshit Shah <darnir@gmail.com>
|
||||
|
||||
* ftp.c (getftp): Remove a call to assert(1) and replace with error message
|
||||
|
||||
2014-12-04 Darshit Shah <darnir@gmail.com>
|
||||
|
||||
* wget.h: Define MIX and MAX macros globally for all files
|
||||
|
@ -724,8 +724,10 @@ Error in server response, closing control connection.\n"));
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Can't happen. */
|
||||
assert (1);
|
||||
logprintf (LOG_ALWAYS, _("Logically impossible section reached in getftp()"));
|
||||
logprintf (LOG_ALWAYS, _("cwd_count: %d\ncwd_start: %d\ncwd_end: %d\n"),
|
||||
cwd_count, cwd_start, cwd_end);
|
||||
abort ();
|
||||
}
|
||||
|
||||
if (!opt.server_response)
|
||||
|
Loading…
Reference in New Issue
Block a user