[commit] r2228 - trunk/GME/Mga
    GMESRC Repository Notifications 
    gme-commit at list.isis.vanderbilt.edu
       
    Tue Jun 11 17:32:51 CDT 2013
    
    
  
Author: ksmyth
Date: Tue Jun 11 17:32:51 2013
New Revision: 2228
Log:
Fix crash with MgaProject::GetObjectByID and empty (null) id
Modified:
   trunk/GME/Mga/MgaProject.cpp
Modified: trunk/GME/Mga/MgaProject.cpp
==============================================================================
--- trunk/GME/Mga/MgaProject.cpp	Tue Jun  4 10:14:32 2013	(r2227)
+++ trunk/GME/Mga/MgaProject.cpp	Tue Jun 11 17:32:51 2013	(r2228)
@@ -723,6 +723,10 @@
 		CHECK_OUTPTRPAR(pVal);
 		metaid_type mm; // short
 		objid_type ss;  // long
+		if (SysStringLen(id) == 0)
+		{
+			COMTHROW(E_MGA_BAD_ID);
+		}
 		if( swscanf(id,OLESTR("id-%04hx-%08lx"), &mm, &ss) != 2 || 
 			mm < DTID_MODEL || mm > DTID_FOLDER) COMTHROW(E_MGA_BAD_ID);
 		CoreObj obj;
    
    
More information about the gme-commit
mailing list