diff options
author | Craig A. Berry <craigberry@mac.com> | 2012-02-09 17:33:51 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2012-02-09 17:33:51 -0600 |
commit | e645f6f85b37f489934a5d203a215f35fd765ed6 (patch) | |
tree | 20d9943529b9147a433426d8647204e744f225fe /vms | |
parent | 8129baca5dd762540c807db6ddf8d2e9fa4121b2 (diff) | |
download | perl-e645f6f85b37f489934a5d203a215f35fd765ed6.tar.gz |
Avoid null pointer dereference in tovmsspec.
Before 360732b5267d5, when dirend was either never set at all or
set to NULL, the routine always returned early before executing
the parts that look at dirend. But after that change it became
possible to dereference a null dirend pointer. Let's not do that.
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -8402,8 +8402,7 @@ static char *int_tovmsspec return rslt; } } - - if (*(dirend+1) == '.') { /* do we have trailing "/." or "/.." or "/..."? */ + else if (*(dirend+1) == '.') { /* do we have trailing "/." or "/.." or "/..."? */ if (!*(dirend+2)) dirend +=2; if (*(dirend+2) == '.' && !*(dirend+3)) dirend += 3; if (decc_efs_charset == 0) { |