Revision: 69980 http://sourceforge.net/p/brlcad/code/69980 Author: d_rossberg Date: 2017-07-21 19:08:00 +0000 (Fri, 21 Jul 2017) Log Message: ----------- bugfix in username reporting utility: strlen(NULL) gives a segemntation fault
Modified Paths: -------------- brlcad/trunk/CMakeLists.txt Modified: brlcad/trunk/CMakeLists.txt =================================================================== --- brlcad/trunk/CMakeLists.txt 2017-07-21 15:17:46 UTC (rev 69979) +++ brlcad/trunk/CMakeLists.txt 2017-07-21 19:08:00 UTC (rev 69980) @@ -2718,8 +2718,8 @@ #endif int main(void) { char *name = getenv(\"USERNAME\"); - if (strlen(name) == 0) name = getenv(\"USER\"); - if (strlen(name) == 0) name = \"unknown\"; + if ((name == 0) || (strlen(name) == 0)) name = getenv(\"USER\"); + if ((name == 0) || (strlen(name) == 0)) name = \"unknown\"; printf(\"%s\", name); return 0; }") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits