From 3c9ef608bb70de3c4787bd00f0484963a8d0a8e1 Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Thu, 30 Apr 2026 09:18:17 +0000 Subject: [PATCH] fix: V-001 security vulnerability Automated security fix generated by Orbis Security AI --- .../firefox/juggler/pipe/nsRemoteDebuggingPipe.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/browser_patches/firefox/juggler/pipe/nsRemoteDebuggingPipe.cpp b/browser_patches/firefox/juggler/pipe/nsRemoteDebuggingPipe.cpp index abcb0a758fac1..2b4d5eca48655 100644 --- a/browser_patches/firefox/juggler/pipe/nsRemoteDebuggingPipe.cpp +++ b/browser_patches/firefox/juggler/pipe/nsRemoteDebuggingPipe.cpp @@ -182,10 +182,14 @@ void nsRemoteDebuggingPipe::ReaderLoop() { ++end; start = end; } - if (start != 0 && start < line.size()) { - memmove(line.data(), line.data() + start, line.size() - start); + if (start != 0) { + if (start < line.size()) { + memmove(line.data(), line.data() + start, line.size() - start); + line.resize(line.size() - start); + } else { + line.clear(); + } } - line.resize(line.size() - start); } }