summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2000-12-14 13:10:49 -0600
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-15 02:53:40 +0000
commit39efa3ccdd2b93b61c2422c3c571d34055e1352b (patch)
treea9d9c1a52e82768b7838f80e5994d651bd17e8ed /vms
parentd0e6d399d7d5c2c9072a29da40b2cf4e9246353f (diff)
downloadperl-39efa3ccdd2b93b61c2422c3c571d34055e1352b.tar.gz
Re: [ID 20001214.011] Unreachable value in a search list logical name
Message-Id: <p04330100b65efbe32f30@[172.16.52.1]> p4raw-id: //depot/perl@8122
Diffstat (limited to 'vms')
-rw-r--r--vms/vms.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vms/vms.c b/vms/vms.c
index d0add5534f..fec955cb86 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -98,6 +98,9 @@ struct itmlst_3 {
#define expand_wild_cards(a,b,c,d) mp_expand_wild_cards(aTHX_ a,b,c,d)
#define getredirection(a,b) mp_getredirection(aTHX_ a,b)
+/* see system service docs for $TRNLNM -- NOT the same as LNM$_MAX_INDEX */
+#define PERL_LNM_MAX_ALLOWED_INDEX 127
+
static char *__mystrtolower(char *str)
{
if (str) for (; *str; ++str) *str= tolower(*str);
@@ -152,7 +155,7 @@ Perl_vmstrnenv(pTHX_ const char *lnm, char *eqv, unsigned long int idx,
}
#endif
- if (!lnm || !eqv || idx > LNM$_MAX_INDEX) {
+ if (!lnm || !eqv || idx > PERL_LNM_MAX_ALLOWED_INDEX) {
set_errno(EINVAL); set_vaxc_errno(SS$_BADPARAM); return 0;
}
for (cp1 = (char *)lnm, cp2 = uplnm; *cp1; cp1++, cp2++) {