Skip to content
Permalink
Browse files

Avoid null dereference

  • Loading branch information
nyalldawson committed Feb 18, 2015
1 parent e952fe8 commit 7c4de560a62916b3acf4f6c81b065ae68869a57b
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp
@@ -403,8 +403,14 @@ bool DL_Dxf::getChoppedLine( char *s, unsigned int size,
*/
bool DL_Dxf::stripWhiteSpace( char** s )
{
if ( !s || !( *s ) )
return false;

// last non-NULL char:
int lastChar = strlen( *s ) - 1;
if ( lastChar < 0 )
return false;

// QgsDebugMsg(QString("lastChar: %1").arg(lastChar));

// Is last character CR or LF?

0 comments on commit 7c4de56

Please sign in to comment.
You can’t perform that action at this time.