1 --- plib-1.8.5/src/ssg/ssgParser.cxx~
2 +++ plib-1.8.5/src/ssg/ssgParser.cxx
3 @@ -57,18 +57,16 @@ void _ssgParser::error( const char *form
7 - char* msgptr = msgbuff;
10 - msgptr += sprintf ( msgptr,"%s, line %d: ",
14 va_start( argp, format );
15 - vsprintf( msgptr, format, argp );
16 + vsnprintf( msgbuff, sizeof(msgbuff), format, argp );
19 - ulSetError ( UL_WARNING, "%s", msgbuff ) ;
22 + ulSetError ( UL_WARNING, "%s, line %d: %s", path, linenum, msgbuff ) ;
24 + ulSetError ( UL_WARNING, "%s", msgbuff ) ;
29 @@ -78,18 +76,16 @@ void _ssgParser::message( const char *fo
33 - char* msgptr = msgbuff;
36 - msgptr += sprintf ( msgptr,"%s, line %d: ",
40 va_start( argp, format );
41 - vsprintf( msgptr, format, argp );
42 + vsnprintf( msgbuff, sizeof(msgbuff), format, argp );
45 - ulSetError ( UL_DEBUG, "%s", msgbuff ) ;
48 + ulSetError ( UL_DEBUG, "%s, line %d: %s", path, linenum, msgbuff ) ;
50 + ulSetError ( UL_DEBUG, "%s", msgbuff ) ;
54 // Opens the file and does a few internal calculations based on the spec.