Commit Graph

102 Commits (2bc4fb2bf0bef5adf709ef1fc90ba1bcdee7f8d0)

Author SHA1 Message Date
Ansariel 2bc4fb2bf0 Merge branch 'DRTVWR-567' of https://github.com/secondlife/viewer
# Conflicts:
#	indra/llcommon/llqueuedthread.cpp
#	indra/llcommon/llsdserialize.cpp
#	indra/llcommon/llsdserialize.h
#	indra/llcommon/llthreadsafequeue.h
#	indra/llinventory/llsettingssky.cpp
#	indra/llui/llfolderviewitem.cpp
#	indra/llui/llview.h
#	indra/newview/llaisapi.cpp
#	indra/newview/llappviewer.cpp
#	indra/newview/llfloaterproperties.cpp
#	indra/newview/llfloaterproperties.h
#	indra/newview/llinventorybridge.cpp
#	indra/newview/llinventoryfunctions.cpp
#	indra/newview/llinventorypanel.cpp
#	indra/newview/llpanelmaininventory.cpp
#	indra/newview/llpanelmaininventory.h
#	indra/newview/llpanelmarketplaceinbox.cpp
#	indra/newview/llpanelprofile.cpp
#	indra/newview/llpanelprofile.h
#	indra/newview/llpathfindingnavmesh.cpp
#	indra/newview/llselectmgr.cpp
#	indra/newview/llsidepanelinventory.cpp
#	indra/newview/llsidepanelinventory.h
#	indra/newview/llsidepaneliteminfo.cpp
#	indra/newview/llsidepaneltaskinfo.cpp
#	indra/newview/llviewerfloaterreg.cpp
#	indra/newview/skins/default/xui/da/floater_inventory_item_properties.xml
#	indra/newview/skins/default/xui/de/floater_inventory_item_properties.xml
#	indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
#	indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml
#	indra/newview/skins/default/xui/en/panel_main_inventory.xml
#	indra/newview/skins/default/xui/en/panel_profile_firstlife.xml
#	indra/newview/skins/default/xui/en/panel_profile_secondlife.xml
#	indra/newview/skins/default/xui/en/sidepanel_inventory.xml
#	indra/newview/skins/default/xui/en/sidepanel_item_info.xml
#	indra/newview/skins/default/xui/en/sidepanel_task_info.xml
#	indra/newview/skins/default/xui/es/floater_inventory_item_properties.xml
#	indra/newview/skins/default/xui/fr/floater_inventory_item_properties.xml
#	indra/newview/skins/default/xui/it/floater_inventory_item_properties.xml
#	indra/newview/skins/default/xui/ja/floater_inventory_item_properties.xml
#	indra/newview/skins/default/xui/pl/floater_inventory_item_properties.xml
#	indra/newview/skins/default/xui/ru/floater_inventory_item_properties.xml
2023-02-13 23:35:21 +01:00
Andrey Kleshchev 2f4902967a Merge branch 'xcode-14.1' into andreyk/SL-19134
# Conflicts:
#	indra/llcommon/llsdserialize.cpp
#	indra/llcommon/llsdserialize.h
2023-02-03 22:59:50 +02:00
Nat Goodspeed db1d757aeb DRTVWR-575: Update a few more int lengths in llsdserialize.{h,cpp}. 2022-12-06 14:40:11 -05:00
Nat Goodspeed 73aced620f DRTVWR-575: Use llssize (signed size_t) for max_bytes parameters.
Since LLSDSerialize::SIZE_UNLIMITED is negative, passing that through unsigned
size_t parameters could result in peculiar behavior.
2022-12-06 13:59:06 -05:00
Nat Goodspeed 4349cb6165 DRTVWR-575: Address review comments on Xcode 14.1 type tweaks.
Introduce LLSD template constructors and assignment operators to disambiguate
construction or assignment from any integer type to Integer, likewise any
floating point type to Real. Use new narrow() function to validate
conversions.

For LLSD method parameters converted from LLSD::Integer to size_t, where the
method previously checked for a negative argument, make it now check for
size_t converted from negative: in other words, more than S32_MAX. The risk of
having a parameter forced from negative to unsigned exceeds the risk of a
valid length or index over that max.

In lltracerecording.cpp's PeriodicRecording, now that mCurPeriod and
mNumRecordedPeriods are size_t instead of S32, defend against subtracting 1
from 0.

Use narrow() to validate newly-introduced narrowing conversions.

Make llclamp() return the type of the raw input value, even if the types of
the boundary values differ.

std::ostream::tellp() no longer returns a value we can directly report as a
number. Cast to U64.
2022-11-12 18:59:21 -10:00
Nat Goodspeed 9522a0b7c1 DRTVWR-575: Fix llcommon assumptions that size_t fits in 4 bytes.
It's a little distressing how often we have historically coded S32 or U32 to
pass a length or index.

There are more such assumptions in other viewer subdirectories, but this is a
start.
2022-11-03 14:58:32 -04:00
Ansariel 2aceea66ff Merge branch 'DRTVWR-570-maint-Q' of https://bitbucket.org/lindenlab/viewer
# Conflicts:
#	indra/llcommon/llsdserialize.cpp
#	indra/llmath/llvolume.cpp
#	indra/llmath/llvolume.h
#	indra/newview/llfloateropenobject.cpp
#	indra/newview/llfloateropenobject.h
#	indra/newview/llmaterialmgr.cpp
#	indra/newview/llmeshrepository.cpp
#	indra/newview/llmeshrepository.h
#	indra/newview/skins/default/xui/en/floater_openobject.xml
2022-10-01 13:10:39 +02:00
Ansariel 90319f9ef1 Revert "non-allocating unzip_llsd - from Rye"
This reverts commit 4eeb96a935.
2022-10-01 11:51:44 +02:00
Rye Mutt 1b31ab5c52 Introduce a U8* based interface to unzip_llsd and unpackVolumeFaces 2022-09-27 17:59:21 -04:00
Ansariel a0837a5298 Merge branch 'DRTVWR-543-maint' of https://bitbucket.org/lindenlab/viewer 2022-01-14 13:46:29 +01:00
Andrey Kleshchev 5af8f15a05 SL-14541 Replace zlib with zlib-ng 2021-09-08 23:18:07 +03:00
Beq 4eeb96a935 non-allocating unzip_llsd - from Rye 2021-06-10 21:41:55 +01:00
Nicky Dasmijn 27715d4d03 Merge remote-tracking branch 'll/d476' into fs-eep-vs2017-d476 2020-05-21 06:54:02 +02:00
Nat Goodspeed a83da3a452 DRTVWR-476: Make LLSDFormatter::OPTIONS_PRETTY_BINARY uppercase
for compatibility with Python llbase.llsd.parse().

The Python parse() currently requires uppercase hex digits for b16"hex"
coding; lowercase hex digits cause it to raise LLSDParseError.
2020-05-14 08:54:15 -04:00
Nat Goodspeed 066fb5dafc DRTVWR-476: Default LLSDNotationFormatter now OPTIONS_PRETTY_BINARY.
LLSDNotationFormatter (also LLSDNotationStreamer that uses it, plus
operator<<(std::ostream&, const LLSD&) that uses LLSDNotationStreamer) is most
useful for displaying LLSD to a human, e.g. for logging. Having the default
dump raw binary bytes into the log file is not only suboptimal, it can
truncate the output if one of those bytes is '\0'. (This is a problem with the
logging subsystem, but that's a story for another day.)

Use OPTIONS_PRETTY_BINARY wherever there is a default LLSDFormatter
::EFormatterOptions argument.

Also, allow setting LLSDFormatter subclass boolalpha(), realFormat() and
format(options) using optional constructor arguments. Naturally, each subclass
that supports this must accept and forward these constructor arguments to its
LLSDFormatter base class constructor.

Fix a couple bugs in LLSDNotationFormatter::format_impl() for an LLSD::Binary
value with OPTIONS_PRETTY_BINARY:
- The code unconditionally emitted a b(len) type prefix followed by either raw
  binary or hex, depending on the option flag. OPTIONS_PRETTY_BINARY caused it
  to emit "0x" before the hex representation of the data. This is wrong in
  that it can't be read back by either the C++ or the Python LLSD parser.
  Correct OPTIONS_PRETTY_BINARY formatting consists of b16"hex digits" rather
  than b(len)"raw bytes".
- Although the code did set hex mode, it didn't set either the field width or
  the fill character, so that a byte value less than 16 would emit a single
  digit rather than two.

Instead of having one LLSDFormatter::format() method with an optional options
argument, declare two overloads. The format() overload without options passes
the mOptions data member to the overload accepting options.

Refactor the LLSDFormatter family, hoisting the recursive format_impl() method
(accepting level) to a pure virtual method at LLSDFormatter base-class level.
Most subclasses therefore need not override either base-class format() method,
only format_impl(). In fact the short format() overload isn't even virtual.

Consistently use LLSDFormatter::EFormatterOptions enum as the options
parameter wherever such options are accepted.
2020-05-13 16:37:12 -04:00
Andrey Lihatskiy c757c29c95 Merge branch 'master' into DRTVWR-500
# Conflicts:
#	indra/newview/pipeline.cpp
2020-04-20 21:23:34 +03:00
Ansariel da365b227e Merge Firestorm LGPL 2019-12-13 18:15:19 +01:00
Ansariel 6e340961c0 Merge viewer-neko 2019-10-30 18:05:01 +01:00
andreykproductengine 1b4d5492c6 SL-11727 Fix build warnings 2019-10-23 16:37:15 +03:00
Ansariel 1733550573 Merge viewer-eep 2018-09-22 00:42:04 +02:00
Rider Linden 3888de9439 Merge 2018-05-22 13:16:37 -07:00
Rider Linden 7b56db31f9 Merge 2018-03-07 11:27:43 -08:00
Ansariel c4e18fbcaa Merge viewer-neko 2018-02-27 18:08:48 +01:00
Rider Linden b766466b30 Added settings inventory object with subtype 2018-02-26 09:27:14 -08:00
andreykproductengine e32b4f481a MAINT-8308 Additional logging for mesh processing 2018-02-19 21:01:34 +02:00
andreykproductengine f22c1bcf20 MAINT-8022 Handling memory errors in unzip_llsdNavMesh 2018-02-19 21:30:48 +02:00
Ansariel 6d6a2dcd17 Merge viewer-neko 2018-02-02 14:48:43 +01:00
andreykproductengine 64b9b4c771 MAINT-2338 Implemented binary parser depth control 2018-02-01 16:35:02 +02:00
Ansariel 98569f84a2 Merge viewer-neko 2018-01-13 19:11:09 +01:00
andreykproductengine c56298d4ba MAINT-8022 Make unzip silent yet include failure reason into output 2018-01-03 16:30:57 +02:00
andreykproductengine a35008993e MAINT-8022 String crashes in unzip_llsd 2018-01-02 20:31:23 +02:00
andreykproductengine 74362e145b MAINT-8022 Crashes in unzip_llsd #2 2017-11-28 15:55:40 +02:00
andreykproductengine dcfccc6f43 MAINT-8022 Crashes in unzip_llsd #2 2017-11-28 15:55:40 +02:00
andreykproductengine 6d7c19623d MAINT-8022 Crashes in unzip_llsd 2017-11-27 19:04:41 +02:00
andreykproductengine 0c58af90f7 MAINT-8022 Crashes in unzip_llsd 2017-11-27 19:04:41 +02:00
AndreyL ProductEngine 7cc9455fe1 MAINT-6697 Correct pointer freeing 2017-06-07 23:05:37 +03:00
AndreyL ProductEngine d9fe21f17f MAINT-6697 More nullchecks for zip/unzip functions 2017-06-07 19:30:32 +03:00
AndreyL ProductEngine f2780a93c0 MAINT-6697 Added a nullcheck to unzip_llsd() 2017-06-07 03:16:56 +03:00
Ansariel 0feaeed779 MAINT-6697 Correct pointer freeing 2017-06-09 09:34:58 +02:00
Ansariel 424faadc46 Build fix 2017-06-07 21:30:07 +02:00
Ansariel 946bf50568 MAINT-6697 More nullchecks for zip/unzip functions + changes to do it the right way 2017-06-07 21:16:29 +02:00
AndreyL ProductEngine 54ec262671 MAINT-6697 Added a nullcheck to unzip_llsd() 2017-06-07 03:16:56 +03:00
andreykproductengine 7daef28f7c MAINT-6825 Fixing bad_alloc crash 2016-10-28 17:29:30 +03:00
andreykproductengine 26e73e2f58 MAINT-6825 Fixing bad_alloc crash 2016-10-28 17:29:30 +03:00
Ansariel 3192fe832f Merge viewer-quickgraphics 2016-03-08 01:41:31 +01:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Nicky 2bec55ee38 Fix for a possible double free and access of invalid memory. 2015-04-18 19:28:33 +02:00
Ansariel a45088cb6b Merge LL V3.7.11 2015-01-12 12:54:15 +01:00
Ansariel f4bfb1aadf Merge LL V3.7.9 (AIS3 + SSA) 2014-10-22 02:02:08 +02:00
Oz Linden e15002a11c merge changes for 3.7.9-release 2014-06-16 11:42:37 -04:00