ladybird/AK
sin-ack c70f45ff44 Everywhere: Explicitly specify the size in StringView constructors
This commit moves the length calculations out to be directly on the
StringView users. This is an important step towards the goal of removing
StringView(char const*), as it moves the responsibility of calculating
the size of the string to the user of the StringView (which will prevent
naive uses causing OOB access).
2022-07-12 23:11:35 +02:00
..
.clang-tidy
AllOf.h AK: Add nodiscard attribute to AllOf functions 2022-07-04 05:53:56 +00:00
AnyOf.h AK: Add nodiscard attribute to AnyOf functions 2022-07-04 05:53:56 +00:00
ArbitrarySizedEnum.h AK: Add an ArbitrarySizedEnum template 2022-03-27 18:54:56 +02:00
Array.h AK+Userland: Rename Array::front/back to first/last 2022-04-06 14:31:52 +02:00
Assertions.h AK: Make VERIFY() work in MinSizeRel builds 2022-07-09 22:15:43 +02:00
Atomic.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Badge.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Base64.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Base64.h AK: Add nodiscard attribute to Base64 functions 2022-07-04 05:53:56 +00:00
BinaryBufferWriter.h
BinaryHeap.h AK: Add nodiscard attribute to BinaryHeap functions 2022-07-04 05:53:56 +00:00
BinarySearch.h AK: Add nodiscard attribute to BinarySearch functions 2022-07-04 05:53:56 +00:00
BitCast.h AK: Add nodiscard attribute to BitCast functions 2022-07-04 05:53:56 +00:00
Bitmap.h AK: Make Bitmap construction OOM-fallible 2022-02-11 17:49:46 +02:00
BitmapView.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
BitStream.h AK: Add nodiscard attribute to BitStream functions 2022-07-04 05:53:56 +00:00
Buffered.h Everywhere: Switch from EnableIf to requires 2022-03-17 22:15:42 -07:00
BuiltinWrappers.h
BumpAllocator.h
ByteBuffer.h AK: Perform a resize in ByteBuffer::get_bytes_for_writing() 2022-06-27 20:22:15 +01:00
ByteReader.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CharacterTypes.h AK: Change static base36 character map to function-local constexpr 2022-02-10 10:22:54 +00:00
Checked.h AK: Add saturating addition and subtraction to Checked 2022-06-23 23:26:33 +01:00
CheckedFormatString.h AK: Make CheckedFormatString pass the char array size to StringView 2022-07-12 23:11:35 +02:00
CircularDeque.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CircularDuplexStream.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
CircularQueue.h AK: Add non-const iterator for CircularQueue 2022-04-03 09:49:08 -07:00
CMakeLists.txt
Complex.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Concepts.h AK: Add a OneOfIgnoringCV concept 2022-04-20 00:15:23 +04:30
DateConstants.h Everywhere: Deduplicate day/month name constants 2022-03-18 23:48:50 +00:00
DateTimeLexer.h
Debug.h.in LibWeb: Add ability to present LibGL framebuffer and add clearing 2022-06-13 21:45:27 +01:00
Demangle.h Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
DisjointChunks.h AK: Skip over initial empty chunks in DisjointChunks 2022-02-27 00:11:14 +03:30
DistinctNumeric.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
DoublyLinkedList.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Endian.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
EnumBits.h
Error.h AK: Add Error::operator==(Error const&) 2022-06-09 22:08:04 +02:00
ExtraMathConstants.h
FileStream.h
Find.h AK: Add nodiscard attribute to Find functions 2022-07-04 05:53:56 +00:00
FixedArray.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
FixedPoint.h AK: Make sure we don't include Math.h or math.h from KERNEL 2022-04-23 10:43:32 -07:00
FlyString.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
FlyString.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Format.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Format.h AK: Explicitly calculate length of char* when printing 2022-07-12 23:11:35 +02:00
Forward.h AK+Kernel: Remove RefPtrTraits template param in userspace code 2022-06-15 17:15:04 +02:00
FPControl.h AK: Add a cpp-y, more fine grained version of fenv.h: FPControl.h 2022-05-07 20:27:05 +02:00
Function.h
FuzzyMatch.h AK: Add FuzzyMatch header 2022-04-20 18:34:09 +02:00
GenericLexer.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
GenericLexer.h Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
GenericShorthands.h AK: Add header for generic shorthands 2022-07-04 11:15:40 +02:00
HashFunctions.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
HashMap.h AK+LibGUI: Pass predicate to *_matching() methods by const reference 2022-05-08 17:02:00 +02:00
HashTable.h AK: Zero previous pointer *after* fixing the insertion list in HashTable 2022-06-23 20:25:12 +03:00
Hex.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Hex.h AK: Return KString instead of String from encode_hex in the Kernel 2022-02-16 22:21:37 +01:00
IDAllocator.h
IntegralMath.h AK: Add AK::ceil(float) and AK::ceil_log2(integer) 2022-06-30 11:16:22 +02:00
IntrusiveDetails.h
IntrusiveList.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
IntrusiveListRelaxedConst.h
IntrusiveRedBlackTree.h AK: Expose RedBlackTree::find_smallest_not_below() 2022-04-21 13:16:56 +02:00
IPv4Address.h AK: Add IPv4Address::netmask_from_cidr 2022-07-09 09:22:25 +01:00
IPv6Address.h AK: Add Kernel namespace to KStrings in AK::IPv6Address 2022-04-17 16:57:52 -07:00
IterationDecision.h
Iterator.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonArray.h Everywhere: Make JSON serialization fallible 2022-02-27 20:37:57 +01:00
JsonArraySerializer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonObject.h Everywhere: Make JSON serialization fallible 2022-02-27 20:37:57 +01:00
JsonObjectSerializer.h Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
JsonParser.cpp AK: Fix userland parsing of rounded floating point numbers 2022-02-16 07:22:51 -05:00
JsonParser.h AK: Remove unused String[256] from JsonParser 2022-03-10 18:43:09 +01:00
JsonPath.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonPath.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
JsonValue.cpp AK: Treat empty string as invalid JSON 2022-07-10 23:31:48 +02:00
JsonValue.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
kmalloc.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
kmalloc.h AK+Kernel: Avoid double memory clearing of HashTable buckets 2022-03-15 11:56:46 +01:00
kstdio.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
LEB128.h AK: Always check shift amount in LEB128 read functions 2022-07-09 22:04:31 +00:00
LexicalPath.cpp
LexicalPath.h
MACAddress.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Math.h AK: Add AK::ceil(float) and AK::ceil_log2(integer) 2022-06-30 11:16:22 +02:00
MemMem.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Memory.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
MemoryStream.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NeverDestroyed.h
NoAllocationGuard.h
Noncopyable.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NonnullOwnPtr.h Revert "AK: Add comparison operators to NonnullOwnPtr" 2022-06-18 13:17:49 +01:00
NonnullOwnPtrVector.h
NonnullPtrVector.h LibWeb: Make reverse iterators work for const NonnullPtrVectors 2022-04-13 19:52:25 +02:00
NonnullRefPtr.h AK: Add comparison operators to NonnullRefPtr 2022-07-09 09:32:51 +01:00
NonnullRefPtrVector.h
NumberFormat.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
NumericLimits.h
Optional.h AK: Allow Optional<T&> to exist 2022-04-04 12:48:31 +02:00
OwnPtr.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Platform.h AK: Recognize __CLION_IDE__ as well as __CLION_IDE_ 2022-06-26 22:21:17 +01:00
PrintfImplementation.h AK: Make sure we don't include Math.h or math.h from KERNEL 2022-04-23 10:43:32 -07:00
Ptr32.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Queue.h
QuickSort.h
Random.cpp
Random.h
RecursionDecision.h
RedBlackTree.h AK: Expose RedBlackTree::find_smallest_not_below() 2022-04-21 13:16:56 +02:00
RefCounted.h
RefCountForwarder.h
RefPtr.h AK: Add equality operators to compare RefPtr to NonNullRefPtr 2022-07-09 09:32:51 +01:00
Result.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ReverseIterator.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
ScopedValueRollback.h
ScopeGuard.h
ScopeLogger.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
SIMD.h
SIMDExtras.h LibGfx: Implement PNG filtering on write 2022-07-10 15:01:07 +02:00
SIMDMath.h AK: Add clamp(f32x4, float, float) 2022-05-09 21:49:48 +02:00
Singleton.h AK: Yield while waiting for another thread to initialize a Singleton 2022-01-19 01:28:13 +01:00
SinglyLinkedList.h AK: Add SinglyLinkedList::prepend() 2022-06-10 19:06:46 +01:00
SinglyLinkedListWithCount.h
SourceGenerator.h AK: Add string literal helpers to AK::SourceGenerator 2022-07-12 23:11:35 +02:00
SourceLocation.h Everywhere: Explicitly specify the size in StringView constructors 2022-07-12 23:11:35 +02:00
Span.h AK: Add last() utility function to Span 2022-04-02 21:50:41 +02:00
Stack.h
StackInfo.cpp
StackInfo.h
Statistics.h
StdLibExtraDetails.h AK: Add a OneOfIgnoringCV concept 2022-04-20 00:15:23 +04:30
StdLibExtras.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Stream.h
String.cpp AK: Add invert_case() and invert_case(StringView) 2022-05-26 21:51:23 +01:00
String.h AK: Use an enum instead of a bool for String::replace(all_occurences) 2022-07-06 11:12:45 +02:00
StringBuilder.cpp AK: Add a try variant of StringBuilder::append_escaped_for_json 2022-02-27 20:37:57 +01:00
StringBuilder.h AK: Add a try variant of StringBuilder::append_escaped_for_json 2022-02-27 20:37:57 +01:00
StringHash.h
StringImpl.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
StringImpl.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
StringUtils.cpp AK: Use an enum instead of a bool for String::replace(all_occurences) 2022-07-06 11:12:45 +02:00
StringUtils.h AK: Use an enum instead of a bool for String::replace(all_occurences) 2022-07-06 11:12:45 +02:00
StringView.cpp AK: Use an enum instead of a bool for String::replace(all_occurences) 2022-07-06 11:12:45 +02:00
StringView.h AK: Use an enum instead of a bool for String::replace(all_occurences) 2022-07-06 11:12:45 +02:00
TemporaryChange.h
Time.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Time.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Traits.h AK: Add missing include to Traits.h 2022-04-10 19:18:16 +02:00
Trie.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Try.h
Tuple.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
TypeCasts.h
TypedTransfer.h
TypeList.h
Types.h AK: Add an align_down_to power of two helper 2022-07-05 11:26:10 +02:00
UBSanitizer.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UFixedBigInt.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UnicodeUtils.h AK: Remove now-unused AK::UnicodeUtils methods 2022-01-18 15:13:25 +00:00
URL.cpp AK: Make URL ApplicationXWWWFormUrlencoded encoding closer to spec 2022-06-10 22:32:29 +01:00
URL.h AK: Add URL::create_with_help_scheme helper function 2022-04-21 09:12:37 +04:30
URLParser.cpp AK: Use an enum instead of a bool for String::replace(all_occurences) 2022-07-06 11:12:45 +02:00
URLParser.h
Userspace.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Utf8View.cpp AK: Put invalid UTF8 debug spam behind a flag 2022-04-27 00:02:24 +02:00
Utf8View.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Utf16View.cpp AK: Add a Utf16View::code_unit_offset_of(Utf16CodePointIterator) helper 2022-01-31 21:05:04 +02:00
Utf16View.h AK: Add a Utf16View::code_unit_offset_of(Utf16CodePointIterator) helper 2022-01-31 21:05:04 +02:00
Utf32View.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UUID.cpp Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
UUID.h AK+Kernel: Return KString from UUID::to_string() in the Kernel 2022-02-16 22:21:37 +01:00
Variant.h AK: Use static_cast to cast to base type 2022-05-21 02:18:40 +02:00
Vector.h AK+LibGUI: Pass predicate to *_matching() methods by const reference 2022-05-08 17:02:00 +02:00
Weakable.h AK+Kernel: Remove RefPtrTraits template param in userspace code 2022-06-15 17:15:04 +02:00
WeakPtr.h Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00