Merge pull request #10653 from 4fury-c3440d8/b1

updates.
This commit is contained in:
Kamil ATLI
2022-09-08 23:40:15 +03:00
committed by GitHub
14 changed files with 280 additions and 22 deletions
+9 -2
View File
@@ -13,8 +13,8 @@
<PartOf>editor</PartOf>
<Summary>SCIntilla based Text Editor.</Summary>
<Description>Scintilla is a free source code editing component which includes useful features such as syntax styling, error indicators, folding, code completion and call tips.</Description>
<Archive sha1sum="bd15b2ed98368322910a63cc1f1d1fc07954f344" type="targz">
mirrors://sourceforge/project/scintilla/SciTE/5.2.3/scite523.tgz
<Archive sha1sum="5a533b78b0194a48f218c063e97e22f1317aff46" type="targz">
mirrors://sourceforge/project/scintilla/SciTE/5.3.0/scite530.tgz
</Archive>
<BuildDependencies>
<Dependency>lua-devel</Dependency>
@@ -43,6 +43,13 @@
</Package>
<History>
<Update release="4">
<Date>2022-09-05</Date>
<Version>5.3.0</Version>
<Comment>Version bump.</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="3">
<Date>2022-07-10</Date>
<Version>5.2.3</Version>
+9 -3
View File
@@ -15,8 +15,8 @@
<Description>
A tag editor with Qt GUI and command-line interface supporting MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska.
</Description>
<Archive sha1sum="1234c03109d7f2728ced3bd68e212caf2c690cbc" type="targz">
https://github.com/Martchus/tageditor/archive/refs/tags/v3.7.3.tar.gz
<Archive sha1sum="9c919474551518f0205319aad50ae48dc0558baa" type="targz">
https://github.com/Martchus/tageditor/archive/refs/tags/v3.7.5.tar.gz
</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
@@ -48,6 +48,13 @@
</Package>
<History>
<Update release="5">
<Date>2022-09-09</Date>
<Version>3.7.5</Version>
<Comment>Version bump</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="4">
<Date>2022-07-10</Date>
<Version>3.7.3</Version>
@@ -78,4 +85,3 @@
</Update>
</History>
</PISI>
+4 -4
View File
@@ -13,8 +13,8 @@
<PartOf>multimedia.misc</PartOf>
<Summary>C++ library for reading and writing MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags.</Summary>
<Description>C++ library for reading and writing MP4/M4A/AAC (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags.</Description>
<Archive sha1sum="735bcec2186501551ca0b492b4bbce6cdd5a3a37" type="targz">
https://github.com/Martchus/tagparser/archive/refs/tags/v11.3.0.tar.gz
<Archive sha1sum="de80de7b07be9b7f2891eb90e8834faeccf258a8" type="targz">
https://github.com/Martchus/tagparser/archive/refs/tags/v11.5.0.tar.gz
</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
@@ -56,8 +56,8 @@
<History>
<Update release="5">
<Date>2022-07-10</Date>
<Version>11.3.0</Version>
<Date>2022-09-09</Date>
<Version>11.5.0</Version>
<Comment>Version bump.</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
@@ -12,6 +12,9 @@ from pisi.actionsapi import get
shelltools.export("JOBS", get.makeJOBS().replace("-j5", "5"))
options="WXPORT=gtk3 WX_CONFIG=/usr/bin/wx-config-gtk3"
def setup():
pisitools.dosed("buildtools/config.py", "attrdict", deleteLine = True)
def build():
pythonmodules.compile(pyVer = '3', parameters = options)
@@ -12,8 +12,8 @@
<IsA>library</IsA>
<Summary>Python bindings for wxGTK</Summary>
<Description>wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWindows cross platform GUI library, which is written in C++.</Description>
<Archive sha1sum="f952f6224a7c7f000df2150ddfc27edfb4b8f31c" type="targz">
https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-4.1.1.tar.gz
<Archive sha1sum="e4f64e30bf3a5ae48e04685dc4ad01200dd1cfea" type="targz">
https://files.pythonhosted.org/packages/source/w/wxPython/wxPython-4.2.0.tar.gz
</Archive>
<BuildDependencies>
<Dependency>wxGTK3</Dependency>
@@ -51,6 +51,13 @@
</Package>
<History>
<Update release="2">
<Date>2022-09-05</Date>
<Version>4.2.0</Version>
<Comment>Version bump.</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="1">
<Date>2022-07-29</Date>
<Version>4.1.1</Version>
+9 -2
View File
@@ -13,8 +13,8 @@
<PartOf>programming.library</PartOf>
<Summary>Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities.</Summary>
<Description>Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities.</Description>
<Archive sha1sum="6b2d67e7eda99ca2e38673a5c51f7a599ac5d6bd" type="targz">
https://github.com/Martchus/cpp-utilities/archive/refs/tags/v5.17.0.tar.gz
<Archive sha1sum="75e5d5be591ae34bc6ef15effef81bf290a08901" type="targz">
https://github.com/Martchus/cpp-utilities/archive/refs/tags/v5.19.0.tar.gz
</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
@@ -50,6 +50,13 @@
</Package>
<History>
<Update release="5">
<Date>2022-09-09</Date>
<Version>5.19.0</Version>
<Comment>Version bump</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="4">
<Date>2022-07-10</Date>
<Version>5.17.0</Version>
+9 -2
View File
@@ -13,8 +13,8 @@
<PartOf>programming.library</PartOf>
<Summary> Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models.</Summary>
<Description> Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models.</Description>
<Archive sha1sum="93290790844b4f883871527267cd9470edeb6bca" type="targz">
https://github.com/Martchus/qtutilities/archive/refs/tags/v6.6.2.tar.gz
<Archive sha1sum="87e7a4842ad435569cc2c95201d7202d0ff78a06" type="targz">
https://github.com/Martchus/qtutilities/archive/refs/tags/v6.8.0.tar.gz
</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
@@ -53,6 +53,13 @@
</Package>
<History>
<Update release="5">
<Date>2022-09-09</Date>
<Version>6.8.0</Version>
<Comment>Version bump</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="4">
<Date>2022-07-10</Date>
<Version>6.6.2</Version>
+1 -1
View File
@@ -31,5 +31,5 @@ def build():
def install():
shelltools.system("DESTDIR=%s ninja -C build install" % get.installDIR())
pisitools.dodoc("LICENSE.txt", "README*", "RELEASE_NOTES")
pisitools.dodoc("RELEASE_NOTES.md")
@@ -0,0 +1,23 @@
From 616fc2cbd5522137b78097c247feb04e266ff780 Mon Sep 17 00:00:00 2001
From: Nikolaj Bjorner <nbjorner@microsoft.com>
Date: Sun, 4 Sep 2022 16:22:11 -0700
Subject: [PATCH] fix #6314
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
---
src/solver/assertions/asserted_formulas.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/solver/assertions/asserted_formulas.cpp b/src/solver/assertions/asserted_formulas.cpp
index 5780ef227e..5dec90ba7a 100644
--- a/src/solver/assertions/asserted_formulas.cpp
+++ b/src/solver/assertions/asserted_formulas.cpp
@@ -732,7 +732,7 @@ void asserted_formulas::bv_size_reduce_fn::simplify(justified_expr const& j, exp
auto check_reduce = [&](expr* a, expr* b) {
if (bv.is_extract(a, lo, hi, x) && lo > 0 && hi + 1 == bv.get_bv_size(x) && bv.is_numeral(b, r) && r == 0) {
// insert x -> x[0,lo-1] ++ n into sub
- new_term = bv.mk_concat(bv.mk_extract(lo - 1, 0, x), b);
+ new_term = bv.mk_concat(b, bv.mk_extract(lo - 1, 0, x));
m_sub.insert(x, new_term);
n = j.get_fml();
return true;
+12 -2
View File
@@ -13,8 +13,8 @@
<PartOf>programming.library</PartOf>
<Summary>The Z3 Theorem Prover.</Summary>
<Description>Z3 is a theorem prover from Microsoft Research.</Description>
<Archive sha1sum="376d377d1e1c4e0d7be112987a1b65ff6b21563c" type="targz">
https://github.com/Z3Prover/z3/archive/refs/tags/z3-4.8.17.tar.gz
<Archive sha1sum="e70730f338cd392d26136b03e92385b37f3447ec" type="targz">
https://github.com/Z3Prover/z3/archive/refs/tags/z3-4.11.2.tar.gz
</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
@@ -23,6 +23,9 @@
<Dependency>python3-devel</Dependency>
<Dependency>python3-setuptools</Dependency>
</BuildDependencies>
<Patches>
<Patch level="1">616fc2cbd5522137b78097c247feb04e266ff780.patch</Patch>
</Patches>
</Source>
<Package>
@@ -64,6 +67,13 @@
</Package>
<History>
<Update release="6">
<Date>2022-09-05</Date>
<Version>4.11.2</Version>
<Comment>Version bump.</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="5">
<Date>2022-05-28</Date>
<Version>4.8.17</Version>
+2
View File
@@ -11,6 +11,7 @@ from pisi.actionsapi import get
j = ''.join([
' -DUSE_Z3=ON',
' -DUSE_BOOST=ON',
' -DUSE_THREADS=ON',
' -DHAVE_RULES=ON',
' -DPYTHON_EXECUTABLE=/usr/bin/python3',
@@ -18,6 +19,7 @@ j = ''.join([
' -DBUILD_SHARED_LIBS=ON',
' -DBUILD_TESTS=OFF',
' -DCMAKE_BUILD_TYPE=Release',
' -DCMAKE_CONFIGURATION_TYPES=RelWithDebInfo',
' -DUSE_BUNDLED_TINYXML2=OFF',
' -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON',
' -DENABLE_CHECK_INTERNAL=ON',
@@ -0,0 +1,170 @@
From 1e14e360cbb1418a4d4799d4b3a94dfb3b87f271 Mon Sep 17 00:00:00 2001
From: chrchr-github <78114321+chrchr-github@users.noreply.github.com>
Date: Mon, 29 Aug 2022 12:24:58 +0200
Subject: [PATCH] Fix #8295 FN (error) Buffer is accessed out of bounds
(wcpncpy, wcsncpy) (#4412)
* Fix #8295 FN (error) Buffer is accessed out of bounds (wcpncpy, wcsncpy)
* Fix cfg, validation
* Fix validation
---
cfg/cppcheck-cfg.rng | 19 ++++++++++++++++++-
cfg/posix.cfg | 2 +-
cfg/std.cfg | 2 +-
lib/checkbufferoverrun.cpp | 12 +++++++++---
lib/library.cpp | 6 +++---
test/cfg/posix.c | 8 ++++++++
test/cfg/std.c | 8 ++++++++
7 files changed, 48 insertions(+), 9 deletions(-)
diff --git a/cfg/cppcheck-cfg.rng b/cfg/cppcheck-cfg.rng
index b81a3533526..1f7b37de26b 100644
--- a/cfg/cppcheck-cfg.rng
+++ b/cfg/cppcheck-cfg.rng
@@ -283,7 +283,6 @@
<attribute name="type">
<choice>
<value>strlen</value>
- <value>argvalue</value>
<value>sizeof</value>
<value>mul</value>
</choice>
@@ -310,6 +309,24 @@
<attribute name="baseType"><text/></attribute>
</optional>
</element>
+ <element name="minsize">
+ <attribute name="type">
+ <choice>
+ <value>argvalue</value>
+ </choice>
+ </attribute>
+ <attribute name="arg">
+ <ref name="ARGNO"/>
+ </attribute>
+ <optional>
+ <attribute name="arg2">
+ <ref name="ARGNO"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="baseType"><text/></attribute>
+ </optional>
+ </element>
</choice>
</zeroOrMore>
<optional>
diff --git a/cfg/posix.cfg b/cfg/posix.cfg
index 9fa1597f433..83766ed1215 100644
--- a/cfg/posix.cfg
+++ b/cfg/posix.cfg
@@ -5449,7 +5449,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" size-arg="3"/>
<arg nr="1" direction="out">
<not-null/>
- <minsize type="argvalue" arg="3"/>
+ <minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="2" direction="in">
<not-null/>
diff --git a/cfg/std.cfg b/cfg/std.cfg
index 86ce3954a2c..a7387dfb353 100644
--- a/cfg/std.cfg
+++ b/cfg/std.cfg
@@ -5359,7 +5359,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" size-arg="3"/>
<arg nr="1">
<not-null/>
- <minsize type="argvalue" arg="3"/>
+ <minsize type="argvalue" arg="3" baseType="wchar_t"/>
</arg>
<arg nr="2" direction="in">
<not-null/>
diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp
index f929bdbeb73..d8160e81bab 100644
--- a/lib/checkbufferoverrun.cpp
+++ b/lib/checkbufferoverrun.cpp
@@ -593,10 +593,16 @@ static bool checkBufferSize(const Token *ftok, const Library::ArgumentChecks::Mi
return Token::getStrLength(strtoken) < bufferSize;
}
break;
- case Library::ArgumentChecks::MinSize::Type::ARGVALUE:
- if (arg && arg->hasKnownIntValue())
- return arg->getKnownIntValue() <= bufferSize;
+ case Library::ArgumentChecks::MinSize::Type::ARGVALUE: {
+ if (arg && arg->hasKnownIntValue()) {
+ MathLib::bigint myMinsize = arg->getKnownIntValue();
+ unsigned int baseSize = tokenizer->sizeOfType(minsize.baseType);
+ if (baseSize != 0)
+ myMinsize *= baseSize;
+ return myMinsize <= bufferSize;
+ }
break;
+ }
case Library::ArgumentChecks::MinSize::Type::SIZEOF:
// TODO
break;
diff --git a/lib/library.cpp b/lib/library.cpp
index c22d76c3cba..f74b000edb2 100644
--- a/lib/library.cpp
+++ b/lib/library.cpp
@@ -783,9 +783,6 @@ Library::Error Library::loadFunction(const tinyxml2::XMLElement * const node, co
return Error(ErrorCode::BAD_ATTRIBUTE_VALUE, valueattr);
ac.minsizes.emplace_back(type, 0);
ac.minsizes.back().value = minsizevalue;
- const char* baseTypeAttr = argnode->Attribute("baseType");
- if (baseTypeAttr)
- ac.minsizes.back().baseType = baseTypeAttr;
} else {
const char *argattr = argnode->Attribute("arg");
if (!argattr)
@@ -804,6 +801,9 @@ Library::Error Library::loadFunction(const tinyxml2::XMLElement * const node, co
ac.minsizes.back().arg2 = arg2attr[0] - '0';
}
}
+ const char* baseTypeAttr = argnode->Attribute("baseType"); // used by VALUE, ARGVALUE
+ if (baseTypeAttr)
+ ac.minsizes.back().baseType = baseTypeAttr;
}
else if (argnodename == "iterator") {
diff --git a/test/cfg/posix.c b/test/cfg/posix.c
index aad6217ee20..195f86f8575 100644
--- a/test/cfg/posix.c
+++ b/test/cfg/posix.c
@@ -564,6 +564,14 @@ size_t bufferAccessOutOfBounds_strnlen(const char *s, size_t maxlen)
return len;
}
+void bufferAccessOutOfBounds_wcpncpy()
+{
+ wchar_t s[16];
+ wcpncpy(s, L"abc", 16);
+ // cppcheck-suppress bufferAccessOutOfBounds
+ wcpncpy(s, L"abc", 17);
+}
+
size_t nullPointer_strnlen(const char *s, size_t maxlen)
{
// No warning shall be shown:
diff --git a/test/cfg/std.c b/test/cfg/std.c
index 9ca3a61f06c..e60e9063704 100644
--- a/test/cfg/std.c
+++ b/test/cfg/std.c
@@ -556,6 +556,14 @@ void bufferAccessOutOfBounds_wcsftime(wchar_t* ptr, size_t maxsize, const wchar_
(void)wcsftime(ptr, maxsize, format, timeptr);
}
+void bufferAccessOutOfBounds_wcsncpy()
+{
+ wchar_t s[16];
+ wcsncpy(s, L"abc", 16);
+ // cppcheck-suppress bufferAccessOutOfBounds
+ wcsncpy(s, L"abc", 17);
+}
+
int nullPointer_wcsncmp(const wchar_t* s1, const wchar_t* s2, size_t n)
{
// cppcheck-suppress nullPointer
+11 -2
View File
@@ -16,13 +16,14 @@
<Description>
Cppcheck is a static analysis tool for C/C++ code. It provides unique code analysis to detect bugs and focuses on detecting undefined behaviour and dangerous coding constructs. The goal is to detect only real errors in the code (i.e. have very few false positives).
</Description>
<Archive sha1sum="01848d6170812f3993cb35c015c1146b03e5ede2" type="tarbz2">
mirrors://sourceforge/cppcheck/cppcheck-2.8.tar.bz2
<Archive sha1sum="3830a79c3ccc595dfb1e9f0250d38a5cbae5be2e" type="tarbz2">
mirrors://sourceforge/cppcheck/cppcheck-2.9.tar.bz2
</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
<Dependency>z3-devel</Dependency>
<Dependency>zlib-devel</Dependency>
<Dependency>boost-devel</Dependency>
<Dependency>docbook-xsl</Dependency>
<Dependency>qt5-sql-odbc</Dependency>
<Dependency>qt5-linguist</Dependency>
@@ -41,6 +42,7 @@
<Patches>
<Patch level="1">htmlreport_py3.patch</Patch>
<Patch level="1">qm_install_path.patch</Patch>
<Patch level="1">Buffer_is_accessed_out_of_bounds.patch</Patch>
</Patches>
</Source>
@@ -68,6 +70,13 @@
</Package>
<History>
<Update release="11">
<Date>2022-09-05</Date>
<Version>2.9</Version>
<Comment>Ver. bump</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="10">
<Date>2022-05-28</Date>
<Version>2.8</Version>
+9 -2
View File
@@ -12,8 +12,8 @@
<IsA>app</IsA>
<Summary>rofi</Summary>
<Description>A window switcher, application launcher and dmenu replacement.</Description>
<Archive sha1sum="f300c6b74fbfc52d3f2e7f4bf7a63592de300527" type="tarxz">
https://github.com/davatorium/rofi/releases/download/1.7.3/rofi-1.7.3.tar.xz
<Archive sha1sum="282c373fde3021a0b5b87dcfe331085064e3dabf" type="tarxz">
https://github.com/davatorium/rofi/releases/download/1.7.5/rofi-1.7.5.tar.xz
</Archive>
<BuildDependencies>
<Dependency>pango-devel</Dependency>
@@ -71,6 +71,13 @@
</Package>
<History>
<Update release="10">
<Date>2022-09-05</Date>
<Version>1.7.5</Version>
<Comment>Version bump.</Comment>
<Name>fury</Name>
<Email>uglyside@yandex.ru</Email>
</Update>
<Update release="9">
<Date>2022-02-04</Date>
<Version>1.7.3</Version>