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-01-05 15:01:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ugrep (Old) and /work/SRC/openSUSE:Factory/.ugrep.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ugrep" Thu Jan 5 15:01:31 2023 rev:34 rq:1056152 version:3.9.4 Changes: -------- --- /work/SRC/openSUSE:Factory/ugrep/ugrep.changes 2022-12-30 12:28:38.075739649 +0100 +++ /work/SRC/openSUSE:Factory/.ugrep.new.1563/ugrep.changes 2023-01-05 15:01:47.601349377 +0100 @@ -1,0 +2,7 @@ +Thu Jan 5 09:08:20 UTC 2023 - Andreas Stieger <andreas.stie...@gmx.de> + +- update to 3.9.4: + * fix spurious 0 byte in tar filename output results + * fix support for PCRE2 prior 10.34 + +------------------------------------------------------------------- Old: ---- ugrep-3.9.3.tar.gz New: ---- ugrep-3.9.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ugrep.spec ++++++ --- /var/tmp/diff_new_pack.RAn8jI/_old 2023-01-05 15:01:48.145353263 +0100 +++ /var/tmp/diff_new_pack.RAn8jI/_new 2023-01-05 15:01:48.149353291 +0100 @@ -1,7 +1,7 @@ # # spec file for package ugrep # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: ugrep -Version: 3.9.3 +Version: 3.9.4 Release: 0 Summary: Universal grep: a feature-rich grep implementation with focus on speed License: BSD-3-Clause ++++++ ugrep-3.9.3.tar.gz -> ugrep-3.9.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.3/.github/config.yml new/ugrep-3.9.4/.github/config.yml --- old/ugrep-3.9.3/.github/config.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/ugrep-3.9.4/.github/config.yml 2023-01-04 20:55:10.000000000 +0100 @@ -0,0 +1,16 @@ +name: "Code scanning CodeQL config" + +queries: + - uses: security-and-quality + +query-filters: + - exclude: + id: cpp/path-injection # disable - ugrep accepts file command line args + - exclude: + id: cpp/uncontrolled-process-operation # disable - ugrep may fork process given as command line args + - exclude: + id: cpp/user-controlled-bypass # disable - false positives in filename extension check + - exclude: + problem.severity: + - warning # disable code style warnings for C++ noobs + - recommendation # disable code style notes for C++ noobs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.3/.github/workflows/codeql.yml new/ugrep-3.9.4/.github/workflows/codeql.yml --- old/ugrep-3.9.3/.github/workflows/codeql.yml 2022-12-29 17:15:24.000000000 +0100 +++ new/ugrep-3.9.4/.github/workflows/codeql.yml 2023-01-04 20:55:10.000000000 +0100 @@ -30,7 +30,7 @@ uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - queries: +security-and-quality + config-file: .github/config.yml - name: Autobuild uses: github/codeql-action/autobuild@v2 @@ -38,4 +38,23 @@ - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 with: + upload: false # disable the upload here - we will upload in a different action + output: sarif-results category: "/language:${{ matrix.language }}" + + - name: filter-sarif + uses: zbazztian/filter-sarif@master + with: + # filter out all test files, debugging, and autoconf checking files + patterns: | + -**/tests + -**/lib/debug.cpp + -**/conftest.c + -**/conftest.cpp + input: sarif-results/${{ matrix.language }}.sarif + output: sarif-results/${{ matrix.language }}.sarif + + - name: Upload SARIF + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: sarif-results/${{ matrix.language }}.sarif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.3/README.md new/ugrep-3.9.4/README.md --- old/ugrep-3.9.3/README.md 2022-12-29 17:15:24.000000000 +0100 +++ new/ugrep-3.9.4/README.md 2023-01-04 20:55:10.000000000 +0100 @@ -1,4 +1,4 @@ -[![build status][travis-image]][travis-url] [![Language grade: C/C++][lgtm-image]][lgtm-url] [![license][bsd-3-image]][bsd-3-url] +[![build status][travis-image]][travis-url] [![license][bsd-3-image]][bsd-3-url] **ugrep v3.9 is now available: more features & even faster than before** Binary files old/ugrep-3.9.3/bin/win32/ugrep.exe and new/ugrep-3.9.4/bin/win32/ugrep.exe differ Binary files old/ugrep-3.9.3/bin/win64/ugrep.exe and new/ugrep-3.9.4/bin/win64/ugrep.exe differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.3/include/reflex/pcre2matcher.h new/ugrep-3.9.4/include/reflex/pcre2matcher.h --- old/ugrep-3.9.3/include/reflex/pcre2matcher.h 2022-12-29 17:15:24.000000000 +0100 +++ new/ugrep-3.9.4/include/reflex/pcre2matcher.h 2023-01-04 20:55:10.000000000 +0100 @@ -292,8 +292,10 @@ int err; PCRE2_SIZE pos; ASSERT(pat_ != NULL); +#ifdef PCRE2_MATCH_INVALID_UTF if (cop_ & PCRE2_UTF) cop_ |= PCRE2_MATCH_INVALID_UTF; // recommended in the PCRE2 docs when using UTF-8 +#endif opc_ = pcre2_compile(reinterpret_cast<PCRE2_SPTR>(pat_->c_str()), static_cast<PCRE2_SIZE>(pat_->size()), cop_, &err, &pos, NULL); if (opc_ == NULL) { @@ -380,9 +382,11 @@ { DBGLOGN("pcre2_match() pos = %zu end = %zu", pos_, end_); int rc; +#ifdef PCRE2_MATCH_INVALID_UTF if (jit_ && !(flg & PCRE2_ANCHORED)) rc = pcre2_jit_match(opc_, reinterpret_cast<PCRE2_SPTR>(buf_), end_, pos_, flg, dat_, ctx_); else +#endif rc = pcre2_match(opc_, reinterpret_cast<PCRE2_SPTR>(buf_), end_, pos_, flg, dat_, ctx_); if (rc > 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.3/src/query.cpp new/ugrep-3.9.4/src/query.cpp --- old/ugrep-3.9.3/src/query.cpp 2022-12-29 17:15:24.000000000 +0100 +++ new/ugrep-3.9.4/src/query.cpp 2023-01-04 20:55:10.000000000 +0100 @@ -2328,9 +2328,9 @@ size_t n = strlen(cwd); dirs_.assign(cwd); wdir_.assign(cwd); - free(cwd); if (n == 0 || cwd[n-1] != PATHSEPCHR) dirs_.append(PATHSEPSTR); + free(cwd); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.3/src/ugrep.cpp new/ugrep-3.9.4/src/ugrep.cpp --- old/ugrep-3.9.3/src/ugrep.cpp 2022-12-29 17:15:24.000000000 +0100 +++ new/ugrep-3.9.4/src/ugrep.cpp 2023-01-04 20:55:10.000000000 +0100 @@ -1110,12 +1110,14 @@ { // v7 and ustar formats const char ustar_magic[8] = { 'u', 's', 't', 'a', 'r', 0, '0', '0' }; + bool is_ustar = *buf != '\0' && memcmp(buf + 257, ustar_magic, 8) == 0; // gnu and oldgnu formats const char gnutar_magic[8] = { 'u', 's', 't', 'a', 'r', ' ', ' ', 0 }; + bool is_gnutar = *buf != '\0' && memcmp(buf + 257, gnutar_magic, 8) == 0; // is this a tar archive? - if (*buf != '\0' && (memcmp(buf + 257, ustar_magic, 8) == 0 || memcmp(buf + 257, gnutar_magic, 8) == 0)) + if (is_ustar || is_gnutar) { // produce headers with tar file pathnames for each archived part (Grep::partname) if (!flag_no_filename) @@ -1144,22 +1146,16 @@ bool is_xhd = typeflag == 'x'; bool is_extended = typeflag == 'L'; - // assign the (long) tar pathname + // assign the (long) tar pathname, path prefix is 155 bytes (ustar) or 131 bytes (gnutar) path.clear(); if (long_path.empty()) { if (*prefix != '\0') { - if (prefix[154] == '\0') - path.assign(prefix); - else - path.assign(prefix, 155); + path.assign(prefix, strnlen(prefix, is_ustar ? 155 : 131)); path.push_back('/'); } - if (name[99] == '\0') - path.append(name); - else - path.append(name, 100); + path.append(name, strnlen(name, 100)); } else { @@ -1178,21 +1174,22 @@ if (is_xhd) { // typeflag 'x': extract the long path from the pax extended header block in the body - const char *b = reinterpret_cast<const char*>(buf); - const char *e = b + minlen; - const char *t = "path="; - const char *s = std::search(b, e, t, t + 5); - if (s != NULL) + const char *body = reinterpret_cast<const char*>(buf); + const char *end = body + minlen; + const char *key = "path="; + const char *str = std::search(body, end, key, key + 5); + if (str != NULL) { - e = static_cast<const char*>(memchr(s, '\n', e - s)); - if (e != NULL) - long_path.assign(s + 5, e - s - 5); + end = static_cast<const char*>(memchr(str, '\n', end - str)); + if (end != NULL) + long_path.assign(str + 5, end - str - 5); } } else if (is_extended) { // typeflag 'L': get long name from the body - long_path.assign(reinterpret_cast<const char*>(buf), minlen); + const char *body = reinterpret_cast<const char*>(buf); + long_path.assign(body, strnlen(body, minlen)); } // if the pipe is closed, then get a new pipe to search the next part in the archive diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.3/src/ugrep.hpp new/ugrep-3.9.4/src/ugrep.hpp --- old/ugrep-3.9.3/src/ugrep.hpp 2022-12-29 17:15:24.000000000 +0100 +++ new/ugrep-3.9.4/src/ugrep.hpp 2023-01-04 20:55:10.000000000 +0100 @@ -38,7 +38,7 @@ #define UGREP_HPP // ugrep version -#define UGREP_VERSION "3.9.3" +#define UGREP_VERSION "3.9.4" // disable mmap because mmap is almost always slower than the file reading speed improvements since 3.0.0 #define WITH_NO_MMAP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ugrep-3.9.3/src/vkey.cpp new/ugrep-3.9.4/src/vkey.cpp --- old/ugrep-3.9.3/src/vkey.cpp 2022-12-29 17:15:24.000000000 +0100 +++ new/ugrep-3.9.4/src/vkey.cpp 2023-01-04 20:55:10.000000000 +0100 @@ -802,9 +802,21 @@ tcgetattr(tty, &newterm); if (mode == VKey::TTYRAW) + { +#ifdef __sun // no cfmakeraw on SunOS/Solaris https://www.perkin.org.uk/posts/solaris-portability-cfmakeraw.html + newterm.c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + newterm.c_oflag &= ~OPOST; + newterm.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + newterm.c_cflag &= ~(CSIZE|PARENB); + newterm.c_cflag |= CS8; +#else cfmakeraw(&newterm); +#endif + } else + { newterm.c_lflag &= ~(ECHO | ICANON); + } tcsetattr(tty, TCSADRAIN, &newterm);