diff options
Diffstat (limited to 'linden/indra/llcharacter/llbvhloader.cpp')
-rw-r--r-- | linden/indra/llcharacter/llbvhloader.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/linden/indra/llcharacter/llbvhloader.cpp b/linden/indra/llcharacter/llbvhloader.cpp index 6aa430f..48b5e7c 100644 --- a/linden/indra/llcharacter/llbvhloader.cpp +++ b/linden/indra/llcharacter/llbvhloader.cpp | |||
@@ -175,8 +175,8 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
175 | //-------------------------------------------------------------------- | 175 | //-------------------------------------------------------------------- |
176 | char path[LL_MAX_PATH]; /* Flawfinder: ignore */ | 176 | char path[LL_MAX_PATH]; /* Flawfinder: ignore */ |
177 | 177 | ||
178 | snprintf( path, sizeof(path), "%s", | 178 | snprintf( path, sizeof(path), "%s",/* Flawfinder: ignore */ |
179 | gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,fileName).c_str()); /* Flawfinder: ignore */ | 179 | gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,fileName).c_str()); |
180 | 180 | ||
181 | 181 | ||
182 | apr_file_t *fp = ll_apr_file_open(path, LL_APR_R); | 182 | apr_file_t *fp = ll_apr_file_open(path, LL_APR_R); |
@@ -209,7 +209,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
209 | // check the 1st token on the line to determine if it's empty or a comment | 209 | // check the 1st token on the line to determine if it's empty or a comment |
210 | //---------------------------------------------------------------- | 210 | //---------------------------------------------------------------- |
211 | char token[128]; /* Flawfinder: ignore */ | 211 | char token[128]; /* Flawfinder: ignore */ |
212 | if ( sscanf(mLine, " %127s", token) != 1 ) | 212 | if ( sscanf(mLine, " %127s", token) != 1 ) /* Flawfinder: ignore */ |
213 | continue; | 213 | continue; |
214 | 214 | ||
215 | if (token[0] == '#') | 215 | if (token[0] == '#') |
@@ -244,7 +244,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
244 | if (loadingGlobals && LLString::compareInsensitive(token, "emote")==0) | 244 | if (loadingGlobals && LLString::compareInsensitive(token, "emote")==0) |
245 | { | 245 | { |
246 | char emote_str[1024]; /* Flawfinder: ignore */ | 246 | char emote_str[1024]; /* Flawfinder: ignore */ |
247 | if ( sscanf(mLine, " %*s = %1023s", emote_str) != 1 ) | 247 | if ( sscanf(mLine, " %*s = %1023s", emote_str) != 1 ) /* Flawfinder: ignore */ |
248 | return ST_NO_XLT_EMOTE; | 248 | return ST_NO_XLT_EMOTE; |
249 | 249 | ||
250 | mEmoteName.assign( emote_str ); | 250 | mEmoteName.assign( emote_str ); |
@@ -282,7 +282,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
282 | { | 282 | { |
283 | mLoop = TRUE; | 283 | mLoop = TRUE; |
284 | } | 284 | } |
285 | else if ( sscanf(mLine, " %*s = %127s", trueFalse) == 1 ) | 285 | else if ( sscanf(mLine, " %*s = %127s", trueFalse) == 1 ) /* Flawfinder: ignore */ |
286 | { | 286 | { |
287 | mLoop = (LLString::compareInsensitive(trueFalse, "true")==0); | 287 | mLoop = (LLString::compareInsensitive(trueFalse, "true")==0); |
288 | } | 288 | } |
@@ -304,7 +304,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
304 | { | 304 | { |
305 | F32 duration; | 305 | F32 duration; |
306 | char type[128]; /* Flawfinder: ignore */ | 306 | char type[128]; /* Flawfinder: ignore */ |
307 | if ( sscanf(mLine, " %*s = %f %127s", &duration, type) != 2 ) | 307 | if ( sscanf(mLine, " %*s = %f %127s", &duration, type) != 2 ) /* Flawfinder: ignore */ |
308 | return ST_NO_XLT_EASEIN; | 308 | return ST_NO_XLT_EASEIN; |
309 | 309 | ||
310 | mEaseIn = duration; | 310 | mEaseIn = duration; |
@@ -317,8 +317,8 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
317 | if (loadingGlobals && LLString::compareInsensitive(token, "easeout")==0) | 317 | if (loadingGlobals && LLString::compareInsensitive(token, "easeout")==0) |
318 | { | 318 | { |
319 | F32 duration; | 319 | F32 duration; |
320 | char type[128]; | 320 | char type[128]; /* Flawfinder: ignore */ |
321 | if ( sscanf(mLine, " %*s = %f %127s", &duration, type) != 2 ) | 321 | if ( sscanf(mLine, " %*s = %f %127s", &duration, type) != 2 ) /* Flawfinder: ignore */ |
322 | return ST_NO_XLT_EASEOUT; | 322 | return ST_NO_XLT_EASEOUT; |
323 | 323 | ||
324 | mEaseOut = duration; | 324 | mEaseOut = duration; |
@@ -343,7 +343,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
343 | Constraint constraint; | 343 | Constraint constraint; |
344 | 344 | ||
345 | // try reading optional target direction | 345 | // try reading optional target direction |
346 | if(sscanf( | 346 | if(sscanf( /* Flawfinder: ignore */ |
347 | mLine, | 347 | mLine, |
348 | " %*s = %d %f %f %f %f %15s %f %f %f %15s %f %f %f %f %f %f", | 348 | " %*s = %d %f %f %f %f %15s %f %f %f %15s %f %f %f %f %f %f", |
349 | &constraint.mChainLength, | 349 | &constraint.mChainLength, |
@@ -363,7 +363,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
363 | &constraint.mTargetDir.mV[VY], | 363 | &constraint.mTargetDir.mV[VY], |
364 | &constraint.mTargetDir.mV[VZ]) != 16) | 364 | &constraint.mTargetDir.mV[VZ]) != 16) |
365 | { | 365 | { |
366 | if(sscanf( | 366 | if(sscanf( /* Flawfinder: ignore */ |
367 | mLine, | 367 | mLine, |
368 | " %*s = %d %f %f %f %f %15s %f %f %f %15s %f %f %f", | 368 | " %*s = %d %f %f %f %f %15s %f %f %f %15s %f %f %f", |
369 | &constraint.mChainLength, | 369 | &constraint.mChainLength, |
@@ -403,7 +403,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
403 | Constraint constraint; | 403 | Constraint constraint; |
404 | 404 | ||
405 | // try reading optional target direction | 405 | // try reading optional target direction |
406 | if(sscanf( | 406 | if(sscanf( /* Flawfinder: ignore */ |
407 | mLine, | 407 | mLine, |
408 | " %*s = %d %f %f %f %f %15s %f %f %f %15s %f %f %f %f %f %f", | 408 | " %*s = %d %f %f %f %f %15s %f %f %f %15s %f %f %f %f %f %f", |
409 | &constraint.mChainLength, | 409 | &constraint.mChainLength, |
@@ -423,7 +423,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
423 | &constraint.mTargetDir.mV[VY], | 423 | &constraint.mTargetDir.mV[VY], |
424 | &constraint.mTargetDir.mV[VZ]) != 16) | 424 | &constraint.mTargetDir.mV[VZ]) != 16) |
425 | { | 425 | { |
426 | if(sscanf( | 426 | if(sscanf( /* Flawfinder: ignore */ |
427 | mLine, | 427 | mLine, |
428 | " %*s = %d %f %f %f %f %15s %f %f %f %15s %f %f %f", | 428 | " %*s = %d %f %f %f %f %15s %f %f %f %15s %f %f %f", |
429 | &constraint.mChainLength, | 429 | &constraint.mChainLength, |
@@ -471,7 +471,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
471 | if ( LLString::compareInsensitive(token, "ignore")==0 ) | 471 | if ( LLString::compareInsensitive(token, "ignore")==0 ) |
472 | { | 472 | { |
473 | char trueFalse[128]; /* Flawfinder: ignore */ | 473 | char trueFalse[128]; /* Flawfinder: ignore */ |
474 | if ( sscanf(mLine, " %*s = %127s", trueFalse) != 1 ) | 474 | if ( sscanf(mLine, " %*s = %127s", trueFalse) != 1 ) /* Flawfinder: ignore */ |
475 | return ST_NO_XLT_IGNORE; | 475 | return ST_NO_XLT_IGNORE; |
476 | 476 | ||
477 | trans->mIgnore = (LLString::compareInsensitive(trueFalse, "true")==0); | 477 | trans->mIgnore = (LLString::compareInsensitive(trueFalse, "true")==0); |
@@ -489,7 +489,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
489 | { | 489 | { |
490 | trans->mRelativePosition.setVec( x, y, z ); | 490 | trans->mRelativePosition.setVec( x, y, z ); |
491 | } | 491 | } |
492 | else if ( sscanf(mLine, " %*s = %127s", relpos) == 1 ) | 492 | else if ( sscanf(mLine, " %*s = %127s", relpos) == 1 ) /* Flawfinder: ignore */ |
493 | { | 493 | { |
494 | if ( LLString::compareInsensitive(relpos, "firstkey")==0 ) | 494 | if ( LLString::compareInsensitive(relpos, "firstkey")==0 ) |
495 | { | 495 | { |
@@ -515,7 +515,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
515 | { | 515 | { |
516 | //F32 x, y, z; | 516 | //F32 x, y, z; |
517 | char relpos[128]; /* Flawfinder: ignore */ | 517 | char relpos[128]; /* Flawfinder: ignore */ |
518 | if ( sscanf(mLine, " %*s = %127s", relpos) == 1 ) | 518 | if ( sscanf(mLine, " %*s = %127s", relpos) == 1 ) /* Flawfinder: ignore */ |
519 | { | 519 | { |
520 | if ( LLString::compareInsensitive(relpos, "firstkey")==0 ) | 520 | if ( LLString::compareInsensitive(relpos, "firstkey")==0 ) |
521 | { | 521 | { |
@@ -540,7 +540,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
540 | if ( LLString::compareInsensitive(token, "outname")==0 ) | 540 | if ( LLString::compareInsensitive(token, "outname")==0 ) |
541 | { | 541 | { |
542 | char outName[128]; /* Flawfinder: ignore */ | 542 | char outName[128]; /* Flawfinder: ignore */ |
543 | if ( sscanf(mLine, " %*s = %127s", outName) != 1 ) | 543 | if ( sscanf(mLine, " %*s = %127s", outName) != 1 ) /* Flawfinder: ignore */ |
544 | return ST_NO_XLT_OUTNAME; | 544 | return ST_NO_XLT_OUTNAME; |
545 | 545 | ||
546 | trans->mOutName = outName; | 546 | trans->mOutName = outName; |
@@ -585,7 +585,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
585 | if ( LLString::compareInsensitive(token, "mergeparent")==0 ) | 585 | if ( LLString::compareInsensitive(token, "mergeparent")==0 ) |
586 | { | 586 | { |
587 | char mergeParentName[128]; /* Flawfinder: ignore */ | 587 | char mergeParentName[128]; /* Flawfinder: ignore */ |
588 | if ( sscanf(mLine, " %*s = %127s", mergeParentName) != 1 ) | 588 | if ( sscanf(mLine, " %*s = %127s", mergeParentName) != 1 ) /* Flawfinder: ignore */ |
589 | return ST_NO_XLT_MERGEPARENT; | 589 | return ST_NO_XLT_MERGEPARENT; |
590 | 590 | ||
591 | trans->mMergeParentName = mergeParentName; | 591 | trans->mMergeParentName = mergeParentName; |
@@ -598,7 +598,7 @@ LLBVHLoader::Status LLBVHLoader::loadTranslationTable(const char *fileName) | |||
598 | if ( LLString::compareInsensitive(token, "mergechild")==0 ) | 598 | if ( LLString::compareInsensitive(token, "mergechild")==0 ) |
599 | { | 599 | { |
600 | char mergeChildName[128]; /* Flawfinder: ignore */ | 600 | char mergeChildName[128]; /* Flawfinder: ignore */ |
601 | if ( sscanf(mLine, " %*s = %127s", mergeChildName) != 1 ) | 601 | if ( sscanf(mLine, " %*s = %127s", mergeChildName) != 1 ) /* Flawfinder: ignore */ |
602 | return ST_NO_XLT_MERGECHILD; | 602 | return ST_NO_XLT_MERGECHILD; |
603 | 603 | ||
604 | trans->mMergeChildName = mergeChildName; | 604 | trans->mMergeChildName = mergeChildName; |
@@ -724,7 +724,7 @@ LLBVHLoader::Status LLBVHLoader::loadBVHFile(const char *buffer, char* error_tex | |||
724 | // get the joint name | 724 | // get the joint name |
725 | //---------------------------------------------------------------- | 725 | //---------------------------------------------------------------- |
726 | char jointName[80]; /* Flawfinder: ignore */ | 726 | char jointName[80]; /* Flawfinder: ignore */ |
727 | if ( sscanf(line.c_str(), "%*s %79s", jointName) != 1 ) | 727 | if ( sscanf(line.c_str(), "%*s %79s", jointName) != 1 ) /* Flawfinder: ignore */ |
728 | { | 728 | { |
729 | strncpy(error_text, line.c_str(), 127); /* Flawfinder: ignore */ | 729 | strncpy(error_text, line.c_str(), 127); /* Flawfinder: ignore */ |
730 | return ST_NO_NAME; | 730 | return ST_NO_NAME; |