Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 765219 Details for
Bug 833444
app-crypt/veracrypt-1.25.7: runtime errors with GLIBCXX_ASSERTIONS
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Possible fix
v1-0001-Platform-Unix-Process.cpp-remove-calls-to-std-vec.patch (text/plain), 1.63 KB, created by
Göktürk Yüksek
on 2022-02-16 02:12:42 UTC
(
hide
)
Description:
Possible fix
Filename:
MIME Type:
Creator:
Göktürk Yüksek
Created:
2022-02-16 02:12:42 UTC
Size:
1.63 KB
patch
obsolete
>From b1ecb1484c00a0bb1a8cdb4e285b3cf92a1e4489 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?G=C3=B6kt=C3=BCrk=20Y=C3=BCksek?= <gokturk@gentoo.org> >Date: Tue, 15 Feb 2022 20:58:38 -0500 >Subject: [PATCH v1 1/1] Platform/Unix/Process.cpp: remove calls to > std::vector::clear() > >The method std::vector::clear() is meant to remove all elements and >set the size to 0. After calling this method, attempting to access an >element in the vector using operator[] triggers an assertion in glibc >that is designed to catch accesses to empty vectors at runtime. > >Instead, use the fill constructor to initialize buffers with 0 as one >would do with memset and not call clear() on them. This ensure that >the size and capacity remains the same, while preventing potential >information leakage. > >Bug: https://bugs.gentoo.org/833444 >--- > src/Platform/Unix/Process.cpp | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > >diff --git a/src/Platform/Unix/Process.cpp b/src/Platform/Unix/Process.cpp >index d148a68..9d961da 100644 >--- a/src/Platform/Unix/Process.cpp >+++ b/src/Platform/Unix/Process.cpp >@@ -118,11 +118,7 @@ namespace VeraCrypt > throw_sys_if (fcntl (errPipe.GetReadFD(), F_SETFL, O_NONBLOCK) == -1); > throw_sys_if (fcntl (exceptionPipe.GetReadFD(), F_SETFL, O_NONBLOCK) == -1); > >- vector <char> buffer (4096), stdOutput (4096), errOutput (4096), exOutput (4096); >- buffer.clear (); >- stdOutput.clear (); >- errOutput.clear (); >- exOutput.clear (); >+ vector <char> buffer (4096, 0), stdOutput (4096, 0), errOutput (4096, 0), exOutput (4096, 0); > > Poller poller (outPipe.GetReadFD(), errPipe.GetReadFD(), exceptionPipe.GetReadFD()); > int status, waitRes; >-- >2.33.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 833444
:
765215
|
765216
|
765217
|
765219
|
765222
|
765224