Project

General

Profile

Actions

Bug #2722

closed

bpf_filter's memory array is signed

Added by guy over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Networking
Target version:
-
Start date:
09/02/2014
Due date:
% Done:

0%

Estimated time:

Description

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) patch Patch to fix this guy, 09/02/2014 11:15 AM
Actions

Also available in: Atom PDF