From 94f161b8c26fd15ea9956d35920749b7928a2ab4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 29 May 2018 09:28:28 +0200 Subject: [PATCH] Eagle SCH import: validate imported symbol names Fixes: lp:1753189 * https://bugs.launchpad.net/kicad/+bug/1753189 --- eeschema/sch_eagle_plugin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eeschema/sch_eagle_plugin.cpp b/eeschema/sch_eagle_plugin.cpp index ac1373857d..c9ccc2f5c5 100644 --- a/eeschema/sch_eagle_plugin.cpp +++ b/eeschema/sch_eagle_plugin.cpp @@ -1064,6 +1064,7 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode ) wxString gatename = epart->deviceset + epart->device + einstance.gate; wxString symbolname = wxString( epart->deviceset + epart->device ); symbolname.Replace( "*", "" ); + LIB_ALIAS::ValidateName( symbolname ); int unit = m_eagleLibs[libraryname].GateUnit[gatename]; @@ -1083,7 +1084,10 @@ void SCH_EAGLE_PLUGIN::loadInstance( wxXmlNode* aInstanceNode ) m_properties.get() ); if( !alias || !alias->GetPart() ) + { + wxLogMessage( wxString::Format( _( "Could not find %s in the imported library" ), kisymbolname ) ); return; + } LIB_PART* part = alias->GetPart(); LIB_ID libId( getLibName(), kisymbolname );