- update CHANGELOG

- added debug messages and a check for glibc return codes from vsnprintf to MUSNPrintF() 

git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@144 3f5042e3-fb1d-0410-be18-d6ca2573e517
This commit is contained in:
jasonw 2010-08-06 15:47:47 +00:00
parent 2c93b33b5f
commit dd3243e79f
2 changed files with 25 additions and 1 deletions

View File

@ -5,6 +5,14 @@ Maui 3.3.1
- Added build system changes to support Cygwin (Yauheni Charniauski, UIIP Minsk)
- Added the --with-cygrunsrv configure option for start maui as Windows service (doesn't use a background daemon).
Cygwin utility cygrunsrv.exe goes it into background independently (Igor Ilyenko, UIIP Minsk)
- changed all remaining mallocs to callocs which zeros memory on allocation. Fixes a crash due
to the way some whiel loops in MResAdjustDRes() expect things to be. (Jason Williams)
- Added proper memory allocation checks to accompany the callocs in MRes.c to avoid
missing memory errors. (Jason Williams)
- Added debug print messages to MUSNPrintF() and added a proper check of the return
code to vsnprintf to be in accordance with glibc >=2.1, if installed. (Jason Williams)
- Changed top-level Makefile BUILDROOT assignment to allow RPM builds (Jason Williams)
- Minor changes to fix a few valgrind errors about uninitialized values (Jason Williams)
Maui 3.3
- Fixed configure script. Was putting RMCFG[name] TYPE=PBS@RMNMHOST@.

View File

@ -5089,7 +5089,7 @@ int MUSNPrintF(
{
int len;
const char *FName = "MUSNPrintF";
va_list Args;
if ((BPtr == NULL) ||
@ -5097,6 +5097,8 @@ int MUSNPrintF(
(Format == NULL) ||
(*BSpace <= 0))
{
DBG(4,fCORE) DPrint("ALERT: Memory Error in %s\n",
FName);
return(FAILURE);
}
@ -5108,9 +5110,23 @@ int MUSNPrintF(
if (len <= 0)
{
DBG(4,fCORE) DPrint("ALERT: vsnprintf Error in %s\n",
FName);
return(FAILURE);
}
#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
/* XXX: The following is true for glibc > 2.1 */
/* if vsnprintf returns the same value as size or greater */
/* then the output is truncated. see man vsnprintf. */
if (len == *BSpace || len > *BSpace) {
DBG(1,fCORE) DPrint("ALERT: Possible vsnprintf truncation in %s\n",
FName);
return(FAILURE);
}
#endif
*BPtr += len;
*BSpace -= len;