[DragonFlyBSD - Bug #2722] bpf_filter's memory array is signed

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Wed Sep 3 06:34:40 PDT 2014


Issue #2722 has been updated by sepherosa.


Fixed, thank!

On Wed, Sep 3, 2014 at 2:15 AM,  <bugtracker-admin at leaf.dragonflybsd.org> wrote:
> Issue #2722 has been reported by guy.
>
> ----------------------------------------
> Bug #2722: bpf_filter's memory array is signed
> http://bugs.dragonflybsd.org/issues/2722
>
> * Author: guy
> * Status: New
> * Priority: Normal
> * Assignee:
> * Category: Networking
> * Target version:
> ----------------------------------------
> The mem[] array in bpf_filter(), for scratch memory in BPF programs, is an array of signed 32-bit integers.  However, 1) all references to it either assign unsigned 32-bit values to elements in the array or assign the value of elements in the array to unsigned 32-bit values, and in some other BSDs it's unsigned.
>
> This shouldn't affect the behavior of the code (at least on 2's-complement machines, but I don't foresee a Univac 2200-series port of any of the BSDs any time soon :-)), but it makes it a bit cleaner and more like some other BSDs (the others will get their own patches) and the current top-of-trunk libpcap.
>
> I've attached a fix.
>
> ---Files--------------------------------
> patch (376 Bytes)
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



-- 
Tomorrow Will Never Die

----------------------------------------
Bug #2722: bpf_filter's memory array is signed
http://bugs.dragonflybsd.org/issues/2722#change-12221

* Author: guy
* Status: New
* Priority: Normal
* Assignee: 
* Category: Networking
* Target version: 
----------------------------------------
The mem[] array in bpf_filter(), for scratch memory in BPF programs, is an array of signed 32-bit integers.  However, 1) all references to it either assign unsigned 32-bit values to elements in the array or assign the value of elements in the array to unsigned 32-bit values, and in some other BSDs it's unsigned.

This shouldn't affect the behavior of the code (at least on 2's-complement machines, but I don't foresee a Univac 2200-series port of any of the BSDs any time soon :-)), but it makes it a bit cleaner and more like some other BSDs (the others will get their own patches) and the current top-of-trunk libpcap.

I've attached a fix.

---Files--------------------------------
patch (376 Bytes)


-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list