Skip to content

Commit eb91d77

Browse files
authored
fix: uthash update and buffer overflow found (#570)
1 parent b31172c commit eb91d77

15 files changed

+137
-995
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ensure .gitmodules always uses LF line endings
2+
.gitmodules text eol=lf

.github/workflows/build-centos8.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99

1010
steps:
1111
- name: Set up Git repository
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
1315
- name: Build LTFS
1416
id: build
1517
uses: LinearTapeFileSystem/CentOS8-Build@v1.6

.github/workflows/build-debian10.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99

1010
steps:
1111
- name: Set up Git repository
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
1315
- name: Build LTFS
1416
id: build
1517
uses: LinearTapeFileSystem/Debian10-Build@v1.1

.github/workflows/build-debian9.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99

1010
steps:
1111
- name: Set up Git repository
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
1315
- name: Build LTFS
1416
id: build
1517
uses: LinearTapeFileSystem/Debian9-Build@v1.0

.github/workflows/build-fedora28.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99

1010
steps:
1111
- name: Set up Git repository
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
1315
- name: Build LTFS
1416
id: build
1517
uses: LinearTapeFileSystem/Fedora28-Build@v1.0

.github/workflows/build-ubuntu-bionic.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99

1010
steps:
1111
- name: Set up Git repository
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
1315
- name: Build LTFS
1416
id: build
1517
uses: LinearTapeFileSystem/Ubuntu1804-Build@v1.0

.github/workflows/build-ubuntu-focal.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99

1010
steps:
1111
- name: Set up Git repository
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
1315
- name: Build LTFS
1416
id: build
1517
uses: LinearTapeFileSystem/Ubuntu2004-Build@v1.1

.github/workflows/build-ubuntu-xeneal.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99

1010
steps:
1111
- name: Set up Git repository
12-
uses: actions/checkout@v1
12+
uses: actions/checkout@v4
13+
with:
14+
submodules: recursive
1315
- name: Build LTFS
1416
id: build
1517
uses: LinearTapeFileSystem/Ubuntu1604-Build@v1.0

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939

4040
steps:
4141
- name: Checkout repository
42-
uses: actions/checkout@v2
42+
uses: actions/checkout@v4
43+
with:
44+
submodules: recursive
4345

4446
# Initializes the CodeQL tools for scanning.
4547
- name: Initialize CodeQL
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Update uthash.h from submodule
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
6+
workflow_dispatch: # Allow manual trigger
7+
push:
8+
paths:
9+
- '.gitmodules'
10+
- 'src/libltfs/uthash_submodule/**'
11+
12+
jobs:
13+
update-uthash:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Update submodule to latest
23+
run: |
24+
git submodule update --remote --merge src/libltfs/uthash_submodule
25+
git add src/libltfs/uthash_submodule
26+
27+
- name: Check for changes
28+
id: check_changes
29+
run: |
30+
git diff --cached --quiet || echo "changed=true" >> $GITHUB_OUTPUT
31+
32+
- name: Create Pull Request
33+
if: steps.check_changes.outputs.changed == 'true'
34+
uses: peter-evans/create-pull-request@v5
35+
with:
36+
commit-message: 'chore: update uthash.h from upstream'
37+
title: 'chore: update uthash.h from upstream'
38+
body: |
39+
Automated update of uthash.h from the official uthash repository.
40+
41+
This PR updates `src/libltfs/uthash.h` to the latest version from the uthash submodule.
42+
43+
**Changes:**
44+
- Updated uthash submodule to latest commit
45+
- Copied uthash.h from submodule to src/libltfs/
46+
47+
**Note:** The OOM handling macros are defined in `uthash_ext.h` and remain unchanged.
48+
branch: automated/update-uthash
49+
delete-branch: true
50+
51+
# Made with Bob

0 commit comments

Comments
 (0)