Skip to content

Commit 9503258

Browse files
committed
Worked on OSS-Fuzz targets
1 parent 2aa4a54 commit 9503258

10 files changed

Lines changed: 271 additions & 19 deletions

File tree

.github/workflows/build_package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
container:
1414
image: ubuntu:${{ matrix.version }}
1515
steps:
16-
- uses: actions/checkout@v6
1716
- name: Set up container
1817
env:
1918
DEBIAN_FRONTEND: noninteractive
@@ -26,6 +25,7 @@ jobs:
2625
run: |
2726
apt update -q
2827
apt install -y autoconf automake autopoint autotools-dev build-essential debhelper dh-autoreconf dh-python fakeroot git libfuse3-dev libtool pkg-config python3-dev python3-setuptools
28+
- uses: actions/checkout@v6
2929
- name: Download test data
3030
run: |
3131
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi
@@ -50,13 +50,13 @@ jobs:
5050
container:
5151
image: registry.fedoraproject.org/fedora:${{ matrix.version }}
5252
steps:
53-
- uses: actions/checkout@v6
5453
- name: Set up container
5554
run: |
5655
dnf install -y dnf-plugins-core langpacks-en
5756
- name: Install build dependencies
5857
run: |
5958
dnf install -y @development-tools autoconf automake fuse3-devel gettext-devel git libtool make pkg-config python3-devel python3-setuptools rpm-build
59+
- uses: actions/checkout@v6
6060
- name: Download test data
6161
run: |
6262
if test -x "synctestdata.sh"; then ./synctestdata.sh; fi

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ AC_PREREQ([2.71])
22

33
AC_INIT(
44
[libvslvm],
5-
[20260626],
5+
[20260705],
66
[https://github.com/libyal/libvslvm/issues])
77

88
AC_CONFIG_SRCDIR(

dpkg/source/local-options

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
extend-diff-ignore = "(^|/)\.codecov\.yml$"
2+
extend-diff-ignore = "(^|/)\.git($|/)"
23
extend-diff-ignore = "(^|/)\.github/.+$"
34
extend-diff-ignore = "(^|/)[^/]+\.(ini|nuspec|ps1|sh|yaml|yml)$"
45
extend-diff-ignore = "(^|/).+/Makefile.in$"

libvslvm.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<package >
33
<metadata>
44
<id>libvslvm</id>
5-
<version>20260626</version>
5+
<version>20260705</version>
66
<authors>Joachim Metz</authors>
77
<owners>joachimmetz</owners>
88
<license type="expression">LGPL-3.0-or-later</license>
99
<projectUrl>https://github.com/libyal/libvslvm</projectUrl>
1010
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1111
<title>libvslvm</title>
1212
<description>Library to access the Linux Logical Volume Manager (LVM) volume system</description>
13-
<releaseNotes>Release of libvslvm 20260626</releaseNotes>
13+
<releaseNotes>Release of libvslvm 20260705</releaseNotes>
1414
<copyright>Copyright (C) 2014-2026</copyright>
1515
<tags>native</tags>
1616
</metadata>

m4/tests.m4

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dnl Functions for testing
22
dnl
3-
dnl Version: 20260612
3+
dnl Version: 20260703
44

55
dnl Function to check if pthread_rwlock_unlock can be hooked for testing
66
AC_DEFUN([AX_TESTS_CHECK_CAN_HOOK_PTHREAD_RWLOCK_UNLOCK],
@@ -85,24 +85,25 @@ AC_DEFUN([AX_TESTS_CHECK_HAVE_MANPAGE_LINTER],
8585
8686
printf '.Dd June 10, 2026\n.Dt TITLE 1\n.Os\n.Sh NAME\n.Nm command\n.Nd example\n' > conftest.1
8787
88+
# Note that if man cannot set the locale it will exit with 0 but print to stderr
8889
AS_IF(
8990
[test "x$MAN" != x],
90-
[LC_ALL="en_US.UTF-8" MANROFFSEQ="" MANWIDTH="80" "$MAN" --warnings -E UTF-8 -l -Tutf8 -Z conftest.1 >/dev/null 2>&1
91+
[LC_ALL="en_US.UTF-8" MANROFFSEQ="" MANWIDTH="80" "$MAN" --warnings -E UTF-8 -l -Tutf8 -Z conftest.1 >/dev/null 2>conftest.err
9192
AS_IF(
92-
[test $? -eq 0],
93+
[test $? -eq 0 && ! test -s conftest.err],
9394
[ac_cv_have_manpage_linter="man-db"])
9495
])
9596
9697
AS_IF(
9798
[test "x$ac_cv_have_manpage_linter" = xno && test "x$MANDOC" != x],
98-
[LC_ALL="en_US.UTF-8" "$MANDOC" -O width=80 -T lint -W all ./conftest.1 >/dev/null 2>&1
99+
[LC_ALL="en_US.UTF-8" "$MANDOC" -O width=80 -T lint -W all ./conftest.1 >/dev/null 2>conftest.err
99100
100101
AS_IF(
101-
[test $? -eq 0],
102+
[test $? -eq 0 && ! test -s conftest.err],
102103
[ac_cv_have_manpage_linter="mandoc"])
103104
])
104105
105-
rm -f conftest.1
106+
rm -f conftest.1 conftest.err
106107
])
107108
])
108109

@@ -251,7 +252,7 @@ dnl Function to detect if tests dependencies are available
251252
AC_DEFUN([AX_TESTS_CHECK_LOCAL],
252253
[AC_CHECK_HEADERS([dlfcn.h])
253254
254-
AC_CHECK_FUNCS([fmemopen getopt mkstemp setenv tzset unlink])
255+
AC_CHECK_FUNCS([getopt mkstemp setenv tmpfile tzset unlink])
255256
256257
AC_CHECK_LIB(
257258
dl,

manuals/vslvmmount.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.Dd June 26, 2026
1+
.Dd July 5, 2026
22
.Dt VSLVMMOUNT 1
33
.Os
44
.Sh NAME
@@ -47,8 +47,8 @@ None
4747
None
4848
.Sh EXAMPLES
4949
.Bd -literal
50-
# vslvmmount /dev/sda1
51-
vslvmmount 20260626
50+
# vslvmmount image1.raw /mnt/vslvm
51+
vslvmmount 20260705
5252
.sp
5353
.Ed
5454
.Sh DIAGNOSTICS

ossfuzz/Makefile.am

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ AM_CPPFLAGS = \
1313

1414
bin_PROGRAMS = \
1515
handle_fuzzer \
16-
logical_volume_fuzzer
16+
logical_volume_fuzzer \
17+
volume_group_fuzzer
1718

1819
handle_fuzzer_SOURCES = \
1920
handle_fuzzer.cc \
@@ -50,6 +51,24 @@ logical_volume_fuzzer_LDADD = \
5051
@LIBCLOCALE_LIBADD@ \
5152
@LIBCERROR_LIBADD@ \
5253
@LIBINTL@
54+
55+
volume_group_fuzzer_SOURCES = \
56+
ossfuzz_libbfio.h \
57+
ossfuzz_libvslvm.h \
58+
volume_group_fuzzer.cc
59+
60+
volume_group_fuzzer_LDADD = \
61+
@LIB_FUZZING_ENGINE@ \
62+
@LIBBFIO_LIBADD@ \
63+
@LIBCPATH_LIBADD@ \
64+
@LIBCFILE_LIBADD@ \
65+
@LIBUNA_LIBADD@ \
66+
@LIBCDATA_LIBADD@ \
67+
../libvslvm/libvslvm.la \
68+
@LIBCNOTIFY_LIBADD@ \
69+
@LIBCLOCALE_LIBADD@ \
70+
@LIBCERROR_LIBADD@ \
71+
@LIBINTL@
5372
endif
5473

5574
DISTCLEANFILES = \
@@ -61,4 +80,6 @@ splint-local:
6180
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(handle_fuzzer_SOURCES)
6281
@echo "Running splint on logical_volume_fuzzer ..."
6382
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(logical_volume_fuzzer_SOURCES)
83+
@echo "Running splint on volume_group_fuzzer ..."
84+
-splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(volume_group_fuzzer_SOURCES)
6485

ossfuzz/logical_volume_fuzzer.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* OSS-Fuzz target for libvslvm handle type
2+
* OSS-Fuzz target for libvslvm logical volume type
33
*
44
* Copyright (C) 2014-2026, Joachim Metz <joachim.metz@gmail.com>
55
*

0 commit comments

Comments
 (0)