From: Gurusamy Sarathy Date: Mon, 7 Feb 2000 09:57:46 +0000 (+0000) Subject: tolerate NULL SITELIB_EXP X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=189d1e8d580baf589b8a569f3f4af6e73eba632f;p=p5sagit%2Fp5-mst-13.2.git tolerate NULL SITELIB_EXP p4raw-id: //depot/perl@5020 --- diff --git a/perl.c b/perl.c index 931e592..8c0a297 100644 --- a/perl.c +++ b/perl.c @@ -3115,12 +3115,15 @@ S_init_perllib(pTHX) #ifdef SITELIB_EXP { - char buf[MAXPATHLEN]; - - strcpy(buf,SITELIB_EXP); - if (strrchr(buf,'/')) /* XXX Hack, Configure var needed */ - *strrchr(buf,'/') = '\0'; - incpush(buf, TRUE); + char *path = SITELIB_EXP; + + if (path) { + char buf[1024]; + strcpy(buf,path); + if (strrchr(buf,'/')) /* XXX Hack, Configure var needed */ + *strrchr(buf,'/') = '\0'; + incpush(buf, TRUE); + } } #endif #if defined(PERL_VENDORLIB_EXP)