pcbnew: Ensure we don't overflow export
\u%4.4 can output between 7-11 bytes, which can overflow and not allow the null terminator to be represented.
This commit is contained in:
parent
5324b65fb0
commit
b31212def2
|
@ -66,7 +66,7 @@ std::string GERBER_JOBFILE_WRITER::formatStringFromUTF32( const wxString& aText
|
|||
fmt_text += char( letter );
|
||||
else
|
||||
{
|
||||
char buff[10];
|
||||
char buff[16];
|
||||
sprintf( buff, "\\u%4.4lX", letter );
|
||||
fmt_text += buff;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue