Files
libSNL/0005-Remove-dangerous-ptrList-assignment-operator.patch
Stefan Brüns 9e07213414 Accepting request 1224635 from home:StefanBruens:branches:science
- Rebased/fixed patches:
  * patch-libSNL-ptrList_h ->
    0001-Fix-incorrect-item-removal-in-ptrList.patch
  * patch-libSNL-build ->
    0002-Fix-shared-library-build.patch
  * libSNL-0.2-no-return-in-non-void-fix.patch ->
    0003-Hide-missing-implementation-of-snlSurface-guessProjL.patch
  * 0001-Do-not-enforce-namespace-std-in-all-headers.patch ->
    0004-Do-not-enforce-namespace-std-in-all-headers.patch
- Add
  * 0005-Remove-dangerous-ptrList-assignment-operator.patch
- Cleanup spec file
- Run test
- Fix build of packages dependent on libSNL (e.g. cgx), add
  0001-Do-not-enforce-namespace-std-in-all-headers.patch

OBS-URL: https://build.opensuse.org/request/show/1224635
OBS-URL: https://build.opensuse.org/package/show/science/libSNL?expand=0&rev=3
2024-11-17 08:01:59 +00:00

45 lines
1.4 KiB
Diff

From 2645101051d94a2062ac30a0c084c20a6dd86ab0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Sun, 17 Nov 2024 08:16:46 +0100
Subject: [PATCH 5/5] Remove dangerous ptrList assignment operator
The semantics of the implementation are broken. According the method
signature the RHS should not be modified (const), but the implementation
moves the content ownership to the LHS.
---
trunk/src/ptrList.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/trunk/src/ptrList.h b/trunk/src/ptrList.h
index 09d6cd7..ee23c32 100644
--- a/trunk/src/ptrList.h
+++ b/trunk/src/ptrList.h
@@ -38,7 +38,7 @@ template < class T > class ptrListItem
// Operators
- ptrListItem<T>& operator= ( const ptrListItem<T>& item );
+ // ptrListItem<T>& operator= ( const ptrListItem<T>& item );
// Linked list functions.
ptrListItem<T>* next();
@@ -200,6 +200,7 @@ template < class T > ptrListItem<T>::ptrListItem ( T* ptr, ptrListItem<T>* chain
prevLnk = 0;
}
+#if 0
template < class T > ptrListItem<T>& ptrListItem<T>::operator= ( const ptrListItem<T>& item )
{
// Assignment Operator.
@@ -220,6 +221,7 @@ template < class T > ptrListItem<T>& ptrListItem<T>::operator= ( const ptrListIt
return *this;
}
+#endif
template < class T > ptrListItem<T>* ptrListItem<T>::next()
{
--
2.47.0