mirror of
https://github.com/mirror/wget.git
synced 2025-01-30 06:10:08 +08:00
* src/convert.c (convert_basename): Do not pass NULL to strrchr()
This commit is contained in:
parent
fac8f8099d
commit
95de9cd97f
@ -486,7 +486,7 @@ convert_basename (const char *p, const struct urlpos *link)
|
||||
{
|
||||
int len = link->size;
|
||||
char *url = NULL;
|
||||
char *org_basename = NULL, *local_basename = NULL;
|
||||
char *org_basename = NULL, *local_basename;
|
||||
char *result = NULL;
|
||||
|
||||
if (*p == '"' || *p == '\'')
|
||||
@ -503,7 +503,7 @@ convert_basename (const char *p, const struct urlpos *link)
|
||||
else
|
||||
org_basename = url;
|
||||
|
||||
local_basename = strrchr (link->local_name, '/');
|
||||
local_basename = link->local_name ? strrchr (link->local_name, '/') : NULL;
|
||||
if (local_basename)
|
||||
local_basename++;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user