From 0dce13377e6fe6ec6c575bdeb725cbf9fd60d107 Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Tue, 3 Nov 2009 16:21:55 -0800 Subject: Fix unposted bug: potential incorrect contract in LLMediaEntry::asLLSD(LLSD& sd) Review #26 Callum found this potential bug in LLMediaEntry::asLLSD(LLSD&). It does not erase the incoming LLSD's WHITELIST_KEY. Every other key is overwritten in this manner, but for the WHITELIST_KEY it is just appended. Note that this is in code common to the server...but I do not believe at this point that there is a bug exhibited by this. Added unit test to test for this case. --- indra/llprimitive/llmediaentry.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/llprimitive/llmediaentry.cpp') diff --git a/indra/llprimitive/llmediaentry.cpp b/indra/llprimitive/llmediaentry.cpp index fa04bf80e7..701300163a 100644 --- a/indra/llprimitive/llmediaentry.cpp +++ b/indra/llprimitive/llmediaentry.cpp @@ -164,6 +164,7 @@ void LLMediaEntry::asLLSD(LLSD& sd) const // "security" fields sd[WHITELIST_ENABLE_KEY] = mWhiteListEnable; + sd.erase(WHITELIST_KEY); for (U32 i=0; i