sprintf() -> snprintf()

This commit is contained in:
matthieu 2009-10-24 13:34:54 +00:00
parent d98b1feacd
commit 252286b3cb
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ void SetMessageMask(int *fd, unsigned long mask)
{
char set_mask_mesg[50];
sprintf(set_mask_mesg,"SET_MASK %lu\n",mask);
snprintf(set_mask_mesg, sizeof(set_mask_mesg), "SET_MASK %lu\n",mask);
SendText(fd,set_mask_mesg,0);
}

View File

@ -116,7 +116,7 @@ int main(int argc, char **argv)
#endif
fd_width = GetFdWidth();
sprintf(mask_mesg,"SET_MASK %lu\n",(unsigned long)(M_FOCUS_CHANGE));
snprintf(mask_mesg, sizeof(mask_mesg), "SET_MASK %lu\n",(unsigned long)(M_FOCUS_CHANGE));
SendInfo(fd,mask_mesg,0);
while(1)