You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is something wrong with this line of code
`void Ui::MessageDialog(const std::string &message){
RedrawStatic();
Dot d=BoundingRect(message);
BorderedWindow w(d.y,d.x);
wattrset((WINDOW *)w,COLOR_PAIR(20));
mvwprintw(w,0,0,message.c_str());//format string vulnerability,when you input your name such as 123%253c%11$n
w.RedrawBorder();
wrefresh(w);
PrepareUiGetch();
int ch;
do{
ch=getch();
}
while(ch!=' ' && ch!=13); //13=return key!=KEY_ENTER, it seems
There is something wrong with this line of code
`void Ui::MessageDialog(const std::string &message){
RedrawStatic();
}`
mvwprintw is not safe。
You should restrict user input to prevent format string vulnerability.
The text was updated successfully, but these errors were encountered: