fix potential infinite loop
This commit is contained in:
@@ -313,8 +313,16 @@ void GetNewStorageDevices( vector<UsbStorageDeviceEx>& vDevicesOut )
|
|||||||
}
|
}
|
||||||
|
|
||||||
CString sLine;
|
CString sLine;
|
||||||
while( f.GetLine(sLine) )
|
while( !f.AtEOF() )
|
||||||
{
|
{
|
||||||
|
switch( f.GetLine(sLine) )
|
||||||
|
{
|
||||||
|
case 0: continue; /* eof */
|
||||||
|
case -1:
|
||||||
|
LOG->Warn( "error reading '%s': %s", fn.c_str(), f.GetError().c_str() );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// /dev/sda1 /mnt/flash1 auto noauto,owner 0 0
|
// /dev/sda1 /mnt/flash1 auto noauto,owner 0 0
|
||||||
char cScsiDev;
|
char cScsiDev;
|
||||||
char szMountPoint[1024];
|
char szMountPoint[1024];
|
||||||
|
|||||||
Reference in New Issue
Block a user