Project

General

Profile

Bug #1519

sshlockout truncates ip

Added by Ermal Luçi over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Ermal Luçi
Category:
-
Target version:
Start date:
05/12/2011
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.0
Affected Architecture:

Description

Reproted here http://forum.pfsense.org/index.php/topic,36641.0.html.
There is a bug in sshlockout where the buffer used to held the ip truncates if the ip is in the longest form

[code]

diff --git a/pfPorts/sshlockout_pf/files/sshlockout_pf.c b/pfPorts/sshlockout_pf/files/sshlockout_pf.c
index f1f742a..194c6b9 100644
--- a/pfPorts/sshlockout_pf/files/sshlockout_pf.c
++ b/pfPorts/sshlockout_pf/files/sshlockout_pf.c
@ -115,7 +115,7 @ pf_tableentry(char *tablename, int n1, int n2, int n3, int n4)
struct pfioc_table io;
struct pfr_table table;
struct pfr_addr addr;
- char buf15 = { 0 };
char buf16 = { 0 };

bzero(&table, sizeof(table));
if (strlcpy(table.pfrt_name, tablename,
[/code]

This diff should fix it and i will commit it soon.

Associated revisions

Revision 7e2dd51d (diff)
Added by Scott Ullrich over 11 years ago

edit.php show an error on opening an empty file

Ticket #1519

History

#1 Updated by Ermal Luçi over 8 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Applied in changeset commit:"08212a218dff0400190dc052c5e73c9ed2fbf18b".

#2 Updated by Ermal Luçi about 8 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF