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

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Wed Sep 3 12:43:09 PDT 2014


Issue #2722 has been updated by swildner.

Status changed from New to Closed

It was pushed (05b1e6eac15534d3ea7e33de2cbccc3d08a286d4)


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

* Author: guy
* Status: Closed
* 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