Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ugrep for openSUSE:Factory checked in at 2023-02-01 16:39:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ugrep (Old) and /work/SRC/openSUSE:Factory/.ugrep.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ugrep" Wed Feb 1 16:39:38 2023 rev:36 rq:1062391 version:3.9.7 Changes: -------- --- /work/SRC/openSUSE:Factory/ugrep/ugrep.changes 2023-01-15 17:58:26.318299958 +0100 +++ /work/SRC/openSUSE:Factory/.ugrep.new.32243/ugrep.changes 2023-02-01 16:39:52.077916133 +0100 @@ -1,0 +2,10 @@ +Wed Feb 1 07:32:36 UTC 2023 - Andreas Stieger <andreas.stie...@gmx.de> + +- update to 3.9.7: + * handle gnutar archive extension field formats to search huge + files (>4GB) stored in (gnu) tar archives +- includes changes gro 3.9.6: + * Fixed a Unicode-specific regex pattern syntax issue that caused + a valid regex pattern to produce a regex syntax error message + +------------------------------------------------------------------- Old: ---- ugrep-3.9.5.tar.gz New: ---- ugrep-3.9.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ugrep.spec ++++++ --- /var/tmp/diff_new_pack.MtV6N8/_old 2023-02-01 16:39:52.741920464 +0100 +++ /var/tmp/diff_new_pack.MtV6N8/_new 2023-02-01 16:39:52.745920490 +0100 @@ -17,7 +17,7 @@ Name: ugrep -Version: 3.9.5 +Version: 3.9.7 Release: 0 Summary: Universal grep: a feature-rich grep implementation with focus on speed License: BSD-3-Clause ++++++ ugrep-3.9.5.tar.gz -> ugrep-3.9.7.tar.gz ++++++ Binary files old/ugrep-3.9.5/bin/win32/ugrep.exe and new/ugrep-3.9.7/bin/win32/ugrep.exe differ Binary files old/ugrep-3.9.5/bin/win64/ugrep.exe and new/ugrep-3.9.7/bin/win64/ugrep.exe differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.5/include/reflex/absmatcher.h new/ugrep-3.9.7/include/reflex/absmatcher.h --- old/ugrep-3.9.5/include/reflex/absmatcher.h 2023-01-14 16:54:59.000000000 +0100 +++ new/ugrep-3.9.7/include/reflex/absmatcher.h 2023-01-31 17:06:32.000000000 +0100 @@ -1028,7 +1028,7 @@ return EOF; if (static_cast<unsigned char>(*s++ = c) >= 0x80) { - while (((++*s = get()) & 0xC0) == 0x80) + while (((*s++ = get()) & 0xC0) == 0x80) continue; got_ = static_cast<unsigned char>(buf_[cur_ = --pos_]); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.5/lib/convert.cpp new/ugrep-3.9.7/lib/convert.cpp --- old/ugrep-3.9.5/lib/convert.cpp 2023-01-14 16:54:59.000000000 +0100 +++ new/ugrep-3.9.7/lib/convert.cpp 2023-01-31 17:06:32.000000000 +0100 @@ -2138,9 +2138,12 @@ { regex.append(par).append(&pattern[loc], pos - loc).push_back(')'); loc = pos; + --pos; } - if (pos > loc) + else if (pos > loc) + { --pos; + } } anc = false; beg = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.5/lib/pattern.cpp new/ugrep-3.9.7/lib/pattern.cpp --- old/ugrep-3.9.5/lib/pattern.cpp 2023-01-14 16:54:59.000000000 +0100 +++ new/ugrep-3.9.7/lib/pattern.cpp 2023-01-31 17:06:32.000000000 +0100 @@ -2810,9 +2810,12 @@ const std::string& filename = *i; size_t len = filename.length(); if ((len > 2 && filename.compare(len - 2, 2, ".h" ) == 0) + || (len > 3 && filename.compare(len - 3, 3, ".hh" ) == 0) || (len > 4 && filename.compare(len - 4, 4, ".hpp") == 0) + || (len > 4 && filename.compare(len - 4, 4, ".hxx") == 0) + || (len > 3 && filename.compare(len - 3, 3, ".cc" ) == 0) || (len > 4 && filename.compare(len - 4, 4, ".cpp") == 0) - || (len > 3 && filename.compare(len - 3, 3, ".cc" ) == 0)) + || (len > 4 && filename.compare(len - 4, 4, ".cxx") == 0)) { FILE *file = NULL; int err = 0; @@ -3212,7 +3215,8 @@ { const std::string& filename = *i; size_t len = filename.length(); - if (len > 3 && filename.compare(len - 3, 3, ".gv") == 0) + if ((len > 3 && filename.compare(len - 3, 3, ".gv") == 0) + || (len > 4 && filename.compare(len - 4, 4, ".dot") == 0)) { FILE *file = NULL; int err = 0; @@ -3359,9 +3363,12 @@ const std::string& filename = *i; size_t len = filename.length(); if ((len > 2 && filename.compare(len - 2, 2, ".h" ) == 0) + || (len > 3 && filename.compare(len - 3, 3, ".hh" ) == 0) || (len > 4 && filename.compare(len - 4, 4, ".hpp") == 0) + || (len > 4 && filename.compare(len - 4, 4, ".hxx") == 0) + || (len > 3 && filename.compare(len - 3, 3, ".cc" ) == 0) || (len > 4 && filename.compare(len - 4, 4, ".cpp") == 0) - || (len > 3 && filename.compare(len - 3, 3, ".cc" ) == 0)) + || (len > 4 && filename.compare(len - 4, 4, ".cxx") == 0)) { FILE *file = NULL; int err = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.5/src/ugrep.cpp new/ugrep-3.9.7/src/ugrep.cpp --- old/ugrep-3.9.5/src/ugrep.cpp 2023-01-14 16:54:59.000000000 +0100 +++ new/ugrep-3.9.7/src/ugrep.cpp 2023-01-31 17:06:32.000000000 +0100 @@ -1135,28 +1135,52 @@ while (!stop) { - // extract tar header fields (name and prefix strings are not \0-terminated!!) + // tar header fields name, size and prefix and make them \0-terminated by overwriting fields we do not use + buf[100] = '\0'; const char *name = reinterpret_cast<const char*>(buf); + // path prefix is up to 155 bytes (ustar) or up to 131 bytes (gnutar) + buf[345 + (is_ustar ? 155 : 131)] = '\0'; const char *prefix = reinterpret_cast<const char*>(buf + 345); - size_t size = strtoul(reinterpret_cast<const char*>(buf + 124), NULL, 8); - int padding = (BLOCKSIZE - size % BLOCKSIZE) % BLOCKSIZE; - unsigned char typeflag = buf[156]; + + // check GNU tar extension with leading byte 0x80 (unsigned positive) or leading byte 0xff (negative) + size_t size = 0; + if (buf[124] == 0x80) + { + // 11 byte big-endian size field without the leading 0x80 + for (short i = 125; i < 136; ++i) + size = (size << 8) + buf[i]; + } + else if (buf[124] == 0xff) + { + // a negative size makes no sense, but let's not ignore it and cast to unsigned + for (short i = 124; i < 136; ++i) + size = (size << 8) + buf[i]; + } + else + { + buf[136] = '\0'; + size = strtoull(reinterpret_cast<const char*>(buf + 124), NULL, 8); + } // header types + unsigned char typeflag = buf[156]; bool is_regular = typeflag == '0' || typeflag == '\0'; bool is_xhd = typeflag == 'x'; bool is_extended = typeflag == 'L'; - // assign the (long) tar pathname, path prefix is 155 bytes (ustar) or 131 bytes (gnutar) + // padding size + int padding = (BLOCKSIZE - size % BLOCKSIZE) % BLOCKSIZE; + + // assign the (long) tar pathname, name and prefix are now \0-terminated path.clear(); if (long_path.empty()) { if (*prefix != '\0') { - path.assign(prefix, strnlen(prefix, is_ustar ? 155 : 131)); + path.assign(prefix); path.push_back('/'); } - path.append(name, strnlen(name, 100)); + path.append(name); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.5/src/ugrep.hpp new/ugrep-3.9.7/src/ugrep.hpp --- old/ugrep-3.9.5/src/ugrep.hpp 2023-01-14 16:54:59.000000000 +0100 +++ new/ugrep-3.9.7/src/ugrep.hpp 2023-01-31 17:06:32.000000000 +0100 @@ -38,7 +38,7 @@ #define UGREP_HPP // ugrep version -#define UGREP_VERSION "3.9.5" +#define UGREP_VERSION "3.9.7" // disable mmap because mmap is almost always slower than the file reading speed improvements since 3.0.0 #define WITH_NO_MMAP