<commit_before>diff -ruN elfio-3.1/elfio/elfio_note.hpp elfio-3.1-repo/elfio/elfio_note.hpp
--- elfio-3.1/elfio/elfio_note.hpp	2016-04-23 07:58:34.000000000 -0700
+++ elfio-3.1-repo/elfio/elfio_note.hpp	2016-07-02 10:32:59.165999433 -0700
@@ -66,15 +66,12 @@
              namesz + descSize > max_name_size ) {
             return false;
         }
-        name.assign( pData + 3 * sizeof( Elf_Word ), namesz );
+        name.assign( pData + 3 * sizeof( Elf_Word ), namesz - 1);
         if ( 0 == descSize ) {
             desc = 0;
         }
         else {
-            int align = sizeof( Elf_Xword );
-            if ( elf_file.get_class() == ELFCLASS32 ) {
-                align = sizeof( Elf_Word );
-            }
+            int align = sizeof( Elf_Word );
             desc = const_cast<char*> ( pData + 3*sizeof( Elf_Word ) +
                                        ( ( namesz + align - 1 ) / align ) * align );
         }
<commit_msg>Updated elfio-3.1.patch to fix alignment bug properly.<commit_after>Binary files elfio-3.1/elfio/.elfio_note.hpp.swp and elfio-3.1-repo/elfio/.elfio_note.hpp.swp differ
diff -ruN elfio-3.1/elfio/elfio_note.hpp elfio-3.1-repo/elfio/elfio_note.hpp
--- elfio-3.1/elfio/elfio_note.hpp	2016-04-23 07:58:34.000000000 -0700
+++ elfio-3.1-repo/elfio/elfio_note.hpp	2016-07-05 14:05:12.524951042 -0700
@@ -66,7 +66,7 @@
              namesz + descSize > max_name_size ) {
             return false;
         }
-        name.assign( pData + 3 * sizeof( Elf_Word ), namesz );
+        name.assign( pData + 3 * sizeof( Elf_Word ), namesz - 1);
         if ( 0 == descSize ) {
             desc = 0;
         }
@@ -75,8 +75,10 @@
             if ( elf_file.get_class() == ELFCLASS32 ) {
                 align = sizeof( Elf_Word );
             }
-            desc = const_cast<char*> ( pData + 3*sizeof( Elf_Word ) +
-                                       ( ( namesz + align - 1 ) / align ) * align );
+
+            size_t offset = ( ( 3*sizeof( Elf_Word ) + namesz + align - 1 ) / align ) * align;
+
+            desc = const_cast<char*> (pData + offset);
         }
 
         return true;

{'fraction_non_alphanumeric': 0.14634146341463414, 'fraction_numerical': 0.08020637898686679, 'mean_word_length': 1.6398514851485149, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7356672', 'n_tokens_mistral': 863, 'n_tokens_neox': 760, 'n_words': 144}