bug in sqUnixExternalPrims.c

John M McIntosh johnmci at smalltalkconsulting.com
Sat Feb 25 20:41:41 UTC 2006

In compiling sqUnixExternalPrims.c
syslimits.h says 	NAME_MAX is 255, and the code uses it  like...

char        libName[NAME_MAX + 32];	/* headroom for prefix/suffix */

But later we say
	sprintf(libName, "%s%s%s%s", dirName, *prefix, moduleName, *suffix);

likely when you stuff a 700 character path name into that 287 char  
array you will die...

That all depends of course what NAME_MAX  is versus FILENAME_MAX  in  

someone might review usage of NAME_MAX and consider the implications

John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com

More information about the Vm-dev mailing list