relative: Fix potential NULL dereference (ALT#14067)
This commit is contained in:
parent
aa45567317
commit
d534994b4e
@ -106,9 +106,7 @@ main(int ac, char *av[])
|
|||||||
{
|
{
|
||||||
const char *orig_what;
|
const char *orig_what;
|
||||||
char *what_p, *to_p, *res;
|
char *what_p, *to_p, *res;
|
||||||
|
char *what, *to;
|
||||||
char *what = xstrdup(av[1]);
|
|
||||||
char *to = xstrdup(av[2]);
|
|
||||||
|
|
||||||
if (ac < 3)
|
if (ac < 3)
|
||||||
{
|
{
|
||||||
@ -117,6 +115,9 @@ main(int ac, char *av[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
what = xstrdup(av[1]);
|
||||||
|
to = xstrdup(av[2]);
|
||||||
|
|
||||||
orig_what = normalize(av[1]);
|
orig_what = normalize(av[1]);
|
||||||
normalize(av[2]);
|
normalize(av[2]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user