[PR #2851] [MERGED] Update libpostexecseccomp.c #4559

Closed
opened 2026-05-05 10:22:23 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/2851
Author: @disconnect3d
Created: 7/9/2019
Status: Merged
Merged: 7/11/2019
Merged by: @reinerh

Base: masterHead: patch-2


📝 Commits (2)

  • 9272159 Update libpostexecseccomp.c
  • 8d8e3c0 Update libpostexecseccomp.c

📊 Changes

1 file changed (+1 additions, -3 deletions)

View changed files

📝 src/libpostexecseccomp/libpostexecseccomp.c (+1 -3)

📄 Description

Removes if (size != 0) condition, which is always true as there is a if (size <= 0) condition before.

Also note that if the if (size <= 0) condition wouldn't be there and size would be 0, there would have been an undefined behavior in due to division by zero in (unsigned short) size / (unsigned short) sizeof(struct sock_filter);.

Found with LGTM: https://lgtm.com/projects/g/netblue30/firejail/snapshot/961c4ca00425b60a7bc8543460031a8ebf3d8aa6/files/src/libpostexecseccomp/libpostexecseccomp.c#x838c24f710410160:1


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/2851 **Author:** [@disconnect3d](https://github.com/disconnect3d) **Created:** 7/9/2019 **Status:** ✅ Merged **Merged:** 7/11/2019 **Merged by:** [@reinerh](https://github.com/reinerh) **Base:** `master` ← **Head:** `patch-2` --- ### 📝 Commits (2) - [`9272159`](https://github.com/netblue30/firejail/commit/92721595c400c89f629ab4025b907b57ae16675f) Update libpostexecseccomp.c - [`8d8e3c0`](https://github.com/netblue30/firejail/commit/8d8e3c0f7c821b37dae9867ab2bd8ef4c65667aa) Update libpostexecseccomp.c ### 📊 Changes **1 file changed** (+1 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/libpostexecseccomp/libpostexecseccomp.c` (+1 -3) </details> ### 📄 Description Removes `if (size != 0)` condition, which is always true as there is a `if (size <= 0)` condition before. Also note that if the `if (size <= 0)` condition wouldn't be there and `size` would be 0, there would have been an undefined behavior in due to division by zero in `(unsigned short) size / (unsigned short) sizeof(struct sock_filter);`. Found with LGTM: https://lgtm.com/projects/g/netblue30/firejail/snapshot/961c4ca00425b60a7bc8543460031a8ebf3d8aa6/files/src/libpostexecseccomp/libpostexecseccomp.c#x838c24f710410160:1 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:22:23 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#4559
No description provided.