summarylogtreecommitdiffstats
path: root/fix_invalid_access.patch
blob: a5b83fc5d2085165fa0555c05c318390caf4220e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- a/lib-src/zipios++/zipios++/zipheadio.h	2021-06-18 22:04:12.000000000 +0200
+++ b/lib-src/zipios++/zipios++/zipheadio.h	2022-05-08 13:58:16.936444854 +0200
@@ -150,7 +150,9 @@
 }
 
 inline void writeByteSeq ( ostream &os, const vector < unsigned char > &vec ) {
-  os.rdbuf()->sputn( reinterpret_cast< const char * >( &( vec[ 0 ] ) ), vec.size() ) ;
+  if ( vec.size () != 0 ) {
+    os.rdbuf()->sputn( reinterpret_cast< const char * >( &( vec[ 0 ] ) ), vec.size() ) ;
+  }
 }
 
 istream& operator>> ( istream &is, ZipLocalEntry &zlh         ) ;