Skip to content

Commit

Permalink
Merge pull request #334 from mikesinouye/multilib
Browse files Browse the repository at this point in the history
Increase buffer size in filename append utility to support more liberty files.
  • Loading branch information
alanminko authored Sep 23, 2024
2 parents 3f7a308 + 8179c73 commit 9539306
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/misc/extra/extraUtilFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
***********************************************************************/

#ifdef WIN32
#include <windows.h>
#define PATH_MAX MAX_PATH
#else
#include <limits.h>
#endif

#include "extra.h"

ABC_NAMESPACE_IMPL_START
Expand Down Expand Up @@ -184,9 +191,9 @@ char * Extra_FileNameGeneric( char * FileName )
***********************************************************************/
char * Extra_FileNameGenericAppend( char * pBase, char * pSuffix )
{
static char Buffer[1000];
static char Buffer[PATH_MAX];
char * pDot;
assert( strlen(pBase) + strlen(pSuffix) < 1000 );
assert( strlen(pBase) + strlen(pSuffix) < PATH_MAX );
strcpy( Buffer, pBase );
if ( (pDot = strrchr( Buffer, '.' )) )
*pDot = 0;
Expand Down

0 comments on commit 9539306

Please sign in to comment.