mirror of https://github.com/fltk/fltk
Fix potential buffer overrun (WIN32 only)
This commit is contained in:
parent
cacaa17499
commit
72901a626c
|
@ -794,7 +794,7 @@ void Fl_WinAPI_Native_File_Chooser_Driver::add_filter(const char *name_in,
|
|||
if ((strlen(name_in)+strlen(winfilter)+3) < sizeof(name)) {
|
||||
sprintf(name, "%s (%s)", name_in, winfilter);
|
||||
} else {
|
||||
sprintf(name, "%.*s", int(sizeof(name)), name_in);
|
||||
sprintf(name, "%.*s", int(sizeof(name))-1, name_in);
|
||||
}
|
||||
}
|
||||
dnullcat(_parsedfilt, name);
|
||||
|
|
Loading…
Reference in New Issue