Update to 0.23.93 for fix CVE-2023-40889,CVE-2023-40890

This commit is contained in:
wk333 2024-02-02 14:41:50 +08:00
parent bf588692fe
commit 73c9f71a43
5 changed files with 9 additions and 44 deletions

View File

@ -1,35 +0,0 @@
--- python/enum.c~ 2022-01-12 10:07:02.151116991 -0600
+++ python/enum.c 2022-01-12 10:14:04.093001534 -0600
@@ -23,6 +23,12 @@
#include "zbarmodule.h"
+#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_SIZE)
+static inline void _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size)
+{ ob->ob_size = size; }
+#define Py_SET_SIZE(ob, size) _Py_SET_SIZE((PyVarObject*)(ob), size)
+#endif
+
static char enumitem_doc[] = PyDoc_STR(
"simple enumeration item.\n"
"\n"
--- python/enum.c~ 2022-01-12 10:16:29.670271662 -0600
+++ python/enum.c 2022-01-12 10:52:11.671258442 -0600
@@ -58,7 +58,7 @@
/* we assume the "fast path" for a single-digit ints (see longobject.c) */
/* this also holds if we get a small_int preallocated long */
- Py_SIZE(&self->val) = Py_SIZE(longval);
+ Py_SET_SIZE(&self->val, longval);
self->val.ob_digit[0] = longval->ob_digit[0];
Py_DECREF(longval);
#else
@@ -148,7 +148,7 @@
/* we assume the "fast path" for a single-digit ints (see longobject.c) */
/* this also holds if we get a small_int preallocated long */
- Py_SIZE(&self->val) = Py_SIZE(longval);
+ Py_SET_SIZE(&self->val, longval);
self->val.ob_digit[0] = longval->ob_digit[0];
Py_DECREF(longval);

Binary file not shown.

BIN
zbar-0.23.93.tar.bz2 Normal file

Binary file not shown.

View File

@ -5,14 +5,13 @@
%endif
Name: zbar
Version: 0.23.90
Version: 0.23.93
Release: 1
Summary: Bar code reader
License: LGPLv2+
License: LGPL-2.1-or-later
URL: https://zbar.sourceforge.net/
Source0: https://linuxtv.org/downloads/%{name}/%{name}-%{version}.tar.bz2
Patch0: use_python3_on_python_script.patch
Patch1: py311.patch
BuildRequires: autoconf
BuildRequires: automake
@ -115,9 +114,7 @@ on Java Native Interface (JNI) applications using ZBar.
%endif
%prep
%setup -q
%patch0 -p1
%patch1 -p0
%autosetup -p1
%build
%configure --with-python=python3 --with-gtk=auto --docdir=%{_docdir}/%{name}-%{version} --with-graphicsmagick --without-xshm --without-xv --enable-codes=ean,databar,code128,code93,code39,codabar,i25,qrcode,sqcode,pdf417
@ -213,6 +210,9 @@ rm -rf $RPM_BUILD_ROOT/usr/share/doc/zbar-%{version}/
%{_docdir}/test_python.py
%changelog
* Fri Feb 02 2024 wangkai <13474090681@163.com> - 0.23.93-1
- Update to 0.23.93 for fix CVE-2023-40889,CVE-2023-40890
* Wed Nov 9 2022 hkgy <kaguyahatu@outlook.com> - 0.23.90-1
- Upgrade to v0.23.90

View File

@ -1,4 +1,4 @@
version_control: hg
src_repo: http://hg.code.sf.net/p/zbar/code
tag_prefix: "^"
version_control: github
src_repo: mchehab/zbar
tag_prefix: ""
separator: "."