// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: error.cc,v 1.5 1998/09/18 02:42:40 jgg Exp $
+// $Id: error.cc,v 1.6 1999/01/18 06:20:07 jgg Exp $
/* ######################################################################
Global Erorr Class - Global error mechanism
// sprintf the description
char S[400];
- vsprintf(S,Description,args);
- sprintf(S + strlen(S)," - %s (%i %s)",Function,errno,strerror(errno));
+ vsnprintf(S,sizeof(S),Description,args);
+ snprintf(S + strlen(S),sizeof(S) - strlen(S),
+ " - %s (%i %s)",Function,errno,strerror(errno));
// Put it on the list
Item *Itm = new Item;
// sprintf the description
char S[400];
- vsprintf(S,Description,args);
- sprintf(S + strlen(S)," - %s (%i %s)",Function,errno,strerror(errno));
+ vsnprintf(S,sizeof(S),Description,args);
+ snprintf(S + strlen(S),sizeof(S) - strlen(S)," - %s (%i %s)",Function,errno,strerror(errno));
// Put it on the list
Item *Itm = new Item;
// sprintf the description
char S[400];
- vsprintf(S,Description,args);
+ vsnprintf(S,sizeof(S),Description,args);
// Put it on the list
Item *Itm = new Item;
// sprintf the description
char S[400];
- vsprintf(S,Description,args);
+ vsnprintf(S,sizeof(S),Description,args);
// Put it on the list
Item *Itm = new Item;