Fixed dosfslabel (by fix-label patch)

Resolves: rhbz#948055
This commit is contained in:
Jaroslav Škarvada 2013-05-02 15:25:18 +02:00
parent c4ab456fd6
commit 2e93a9222a
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,23 @@
diff -up dosfstools-3.0.16/src/dosfslabel.c.orig dosfstools-3.0.16/src/dosfslabel.c
--- dosfstools-3.0.16/src/dosfslabel.c.orig 2013-03-01 08:58:26.000000000 +0100
+++ dosfstools-3.0.16/src/dosfslabel.c 2013-05-02 15:15:24.209671197 +0200
@@ -90,7 +90,7 @@ int main(int argc, char *argv[])
int i;
char *device = NULL;
- char *label = NULL;
+ char label[12] = {0};
loff_t offset;
DIR_ENT de;
@@ -109,8 +109,8 @@ int main(int argc, char *argv[])
device = argv[1];
if (argc == 3) {
- label = argv[2];
- if (strlen(label) > 11) {
+ strncpy(label, argv[2], 11);
+ if (strlen(argv[2]) > 11) {
fprintf(stderr,
"dosfslabel: labels can be no longer than 11 characters\n");
exit(1);

View File

@ -1,11 +1,13 @@
Name: dosfstools
Summary: Utilities for making and checking MS-DOS FAT filesystems on Linux
Version: 3.0.16
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3+
Group: Applications/System
Source0: http://www.daniel-baumann.ch/software/dosfstools/%{name}-%{version}.tar.xz
URL: http://www.daniel-baumann.ch/software/dosfstools/
# Sent upstream
Patch0: dosfstools-3.0.16-fix-label.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@ -15,6 +17,7 @@ drives or on floppies.
%prep
%setup -q
%patch0 -p1 -b .fix-label
%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing"
@ -33,6 +36,10 @@ rm -rf %{buildroot}
%{_mandir}/man8/*
%changelog
* Thu May 2 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 3.0.16-3
- Fixed dosfslabel (by fix-label patch)
Resolves: rhbz#948055
* Mon Mar 11 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 3.0.16-2
- Source0 URL synced with upstream