Increase error message buffer size

Resolves: RHEL-44911
This commit is contained in:
Pavel Cahyna 2024-08-20 19:00:49 +02:00
parent 1e7270185a
commit 1967eb8c89
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff -up mtools-4.0.43/mcopy.c.orig mtools-4.0.43/mcopy.c
--- mtools-4.0.43/mcopy.c.orig 2024-08-20 18:41:43.957181199 +0200
+++ mtools-4.0.43/mcopy.c 2024-08-20 18:40:51.921966014 +0200
@@ -196,7 +196,8 @@ static int _unix_write(MainParam_t *mp,
Stream_t *File=mp->File;
Stream_t *Target, *Source;
struct MT_STAT stbuf;
- char errmsg[80];
+ /* matches buffer size in SimpleFileOpenWithLm() */
+ char errmsg[200];
File->Class->get_data(File, &mtime, 0, 0, 0);

View File

@ -6,6 +6,7 @@ License: GPL-3.0-or-later
Source0: ftp://ftp.gnu.org/gnu/mtools/mtools-%{version}.tar.gz
Url: https://www.gnu.org/software/mtools/
Patch0: mtools-3.9.6-config.patch
Patch1: mtools-4.0.43-errmsgsize.patch
BuildRequires: make
BuildRequires: gcc
@ -31,6 +32,7 @@ Mtools should be installed if you need to use MS-DOS disks
%prep
%setup -q -n %{name}-%{version}
%patch 0 -p1 -b .conf
%patch 1 -p1
%build
autoreconf -fiv