* libltdl/ltdl.c (lt_dlopen): missing strlen in bound test

This commit is contained in:
Alexandre Oliva 1999-01-09 15:35:32 +00:00 committed by Alexandre Oliva
parent 2a246ffc0d
commit c107321bbd
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
1999-01-09 Alexandre Oliva <oliva@dcc.unicamp.br>
* libltdl/ltdl.c (lt_dlopen): missing strlen in bound test
1999-01-09 Thomas Tanner <tanner@gmx.de>
* NEWS: support for BSD/OS 4.x was not documented

View File

@ -767,11 +767,11 @@ lt_dlopen (filename)
return 0;
}
/* extract the module name from the file name */
if (basename >= MAX_FILENAME)
if (strlen(basename) >= MAX_FILENAME)
return 0;
strcpy(tmp, basename);
tmp[ext - basename] = '\0';
/* canonicalize the modul name */
/* canonicalize the module name */
for (i = 0; i < ext - basename; i++)
if (!isalnum(tmp[i]))
tmp[i] = '_';