bug in sqUnixExternalPrims.c

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

bug in sqUnixExternalPrims.c

johnmci
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  
stdio.h

someone might review usage of NAME_MAX and consider the implications

--
========================================================================
===
John M. McIntosh <[hidden email]> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===