aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerassetstorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerassetstorage.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/linden/indra/newview/llviewerassetstorage.cpp b/linden/indra/newview/llviewerassetstorage.cpp
index 72af419..fd92d75 100644
--- a/linden/indra/newview/llviewerassetstorage.cpp
+++ b/linden/indra/newview/llviewerassetstorage.cpp
@@ -101,7 +101,7 @@ void LLViewerAssetStorage::storeAssetData(
101 // Read the data from the VFS if it'll fit in this packet. 101 // Read the data from the VFS if it'll fit in this packet.
102 if (asset_size + 100 < MTUBYTES) 102 if (asset_size + 100 < MTUBYTES)
103 { 103 {
104 BOOL res = vfile.read(buffer, asset_size); 104 BOOL res = vfile.read(buffer, asset_size); /* Flawfinder: ignore */
105 S32 bytes_read = res ? vfile.getLastBytesRead() : 0; 105 S32 bytes_read = res ? vfile.getLastBytesRead() : 0;
106 106
107 if( bytes_read == asset_size ) 107 if( bytes_read == asset_size )
@@ -162,6 +162,11 @@ void LLViewerAssetStorage::storeAssetData(
162 bool temp_file, 162 bool temp_file,
163 bool is_priority) 163 bool is_priority)
164{ 164{
165 if(!filename)
166 {
167 llerrs << "No filename specified" << llendl;
168 }
169
165 LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID()); 170 LLAssetID asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
166 llinfos << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl; 171 llinfos << "LLViewerAssetStorage::storeAssetData (legacy)" << asset_id << ":" << LLAssetType::lookup(asset_type) << llendl;
167 172
@@ -172,7 +177,7 @@ void LLViewerAssetStorage::storeAssetData(
172 legacy->mUpCallback = callback; 177 legacy->mUpCallback = callback;
173 legacy->mUserData = user_data; 178 legacy->mUserData = user_data;
174 179
175 FILE *fp = LLFile::fopen(filename, "rb"); 180 FILE* fp = LLFile::fopen(filename, "rb"); /* Flawfinder: ignore */
176 if (fp) 181 if (fp)
177 { 182 {
178 LLVFile file(mVFS, asset_id, asset_type, LLVFile::WRITE); 183 LLVFile file(mVFS, asset_id, asset_type, LLVFile::WRITE);