sprintf() -> snprintf()
This commit is contained in:
parent
d98b1feacd
commit
252286b3cb
@ -102,7 +102,7 @@ void SetMessageMask(int *fd, unsigned long mask)
|
|||||||
{
|
{
|
||||||
char set_mask_mesg[50];
|
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);
|
SendText(fd,set_mask_mesg,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
fd_width = GetFdWidth();
|
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);
|
SendInfo(fd,mask_mesg,0);
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user