Make sure that we have a token when doing sscanf in llinventory.cpp and llviewerobject.cpp

Guards against opensim grids that may leave new/blank lines of sorts after their message blocks
This commit is contained in:
Inusaito Sayori
2014-08-06 23:29:23 -04:00
parent 1cd0b70055
commit a82443f271
2 changed files with 9 additions and 9 deletions

View File

@@ -2903,7 +2903,7 @@ BOOL LLViewerObject::loadTaskInvFile(const std::string& filename)
while(ifs.good())
{
ifs.getline(buffer, MAX_STRING);
sscanf(buffer, " %254s", keyword); /* Flawfinder: ignore */
if (sscanf(buffer, " %254s", keyword) < 1) continue;
if(0 == strcmp("inv_item", keyword))
{
LLPointer<LLInventoryObject> inv = new LLViewerInventoryItem;