From: Charles Bailey Date: Thu, 2 Mar 2000 04:06:53 +0000 (+0000) Subject: Optional warning for truncated logical name equivalence string (Dan Sugalski) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a1dfe75130c702de34f4af6cd0394eb8233338bf;p=p5sagit%2Fp5-mst-13.2.git Optional warning for truncated logical name equivalence string (Dan Sugalski) p4raw-id: //depot/vmsperl@5428 --- diff --git a/vms/vms.c b/vms/vms.c index 16c226a..1aa7a32 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -616,6 +616,12 @@ vmssetenv(char *lnm, char *eqv, struct dsc$descriptor_s **tabvec) } else { if (!*eqv) eqvdsc.dsc$w_length = 1; + if (eqvdsc.dsc$w_length > LNM$C_NAMLENGTH) { + eqvdsc.dsc$w_length = LNM$C_NAMLENGTH; + if (ckWARN(WARN_MISC)) { + Perl_warner(aTHX_ WARN_MISC,"Value of logical \"%s\" too long. Truncating to %i bytes",lnm, LNM$C_NAMLENGTH); + } + } retsts = lib$set_logical(&lnmdsc,&eqvdsc,tabvec[0],0,0); } }