
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
SimEi.PooledLinkedList
Advanced tools
Implementation of a collection similar to the standard System.Collections.Generic.LinkedList<T>
, but without heap allocation on every item insertion by using struct pool under the hood.
When working with Unity, sometimes I had to use the standard LinkedList<T>
, but it came with a big cost - as the Unity's garbage collector is a technology way behind current GC for CoreCLR (as for August 2023 - this is going to change soon because Unity is working on moving to CoreCLR), you have to be careful with every heap allocation. This way, I came up with an idea of implementing LinkedList<T>
with a node pool, being an array of structs, so allocations are needed only during expanding the pool.
Install through NuGet package manager.
Tests in SimEi.PooledLinkedList.Tests
package use MSTest.
API is similar to the standard LinkedList<T>
.
using SimEi.Collections;
var list1 = new PooledLinkedList<int>();
var list2 = new PooledLinkedList<int>(capacity: 5); // Initial pool capacity = 5.
list.AddFirst(1);
var last = list.AddLast(3);
var newLast = list.AddAfter(last, 4);
var second = list.AddBefore(last, 2);
// list contains { 1, 2, 3, 4 }.
list.Remove(last);
// list contains { 1, 2, 4 }.
newLast.Value = 100;
// list contains { 1, 2, 100 }.
list.Clear()
// list is empty.
ItemHandle
You can also add items relative to the current node handle.
list.AddFirst(5).AddAfter(10).AddAfter(20).AddBefore(15);
// list contains { 5, 10, 15, 20 }.
This project is licensed under MIT license.
FAQs
Low-allocation C# LinkedList.
We found that simei.pooledlinkedlist demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.