Changes between Initial Version and Version 1 of Ticket #5258
- Timestamp:
- Oct 7, 2013, 4:59:45 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5258 – Description
initial v1 1 1 In 'hfaopen.cpp': Following lines use 'poPro->proName', 'poPro->proSpheroid.sphereName' and 'poPro->proExeName' and if any of them happen to be null, this cause an access violation and a crash. 2 2 3 4 {{{ 3 5 1450 nSize = 34 + 15 * 8 4 6 1451 + 8 + strlen(poPro->proName) + 1 … … 21 23 1456 22 24 25 }}} 26 23 27 A simple fix would be to initialize the length to 0 and update it the string in question is not not null with the real length. 24 28 … … 27 31 We are setting the string and if it happens to be null, SetFieldValue would cause a crash: 28 32 33 34 {{{ 29 35 901 CPLErr HFAEntry::SetStringField( const char * pszFieldPath, 30 36 902 const char * pszValue ) … … 33 39 905 return SetFieldValue( pszFieldPath, 's', (void *) pszValue ); 34 40 906 } 41 }}} 35 42 36 43 Thanks