File: binpac-1.patch

package info (click to toggle)
binpac 0.59.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,168 kB
  • sloc: cpp: 10,806; yacc: 1,011; lex: 383; sh: 193; makefile: 35
file content (31 lines) | stat: -rw-r--r-- 1,010 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff -urN bro-1.2.1-orig/src/binpac/pac_expr.cc bro-1.2.1-ssl-binpac/src/binpac/pac_expr.cc
--- bro-1.2.1-orig/src/binpac/pac_expr.cc	2006-07-26 15:02:40.000000000 -0700
+++ bro-1.2.1-ssl-binpac/src/binpac/pac_expr.cc	2007-05-04 14:31:11.728494000 -0700
@@ -776,6 +776,27 @@
 			}
 			break;
 
+		case EXPR_CALLARGS:
+		        {
+		        mhs = 0;
+			if ( args_ )
+			        for ( uint i = 0; i < args_->size(); ++i )
+				        mhs = mhs_max(mhs, args_->at(i)->MinimalHeaderSize(env));
+			}
+		        break;
+		case EXPR_CASE:
+		        {
+		        mhs = operand_[0]->MinimalHeaderSize(env);
+			for ( uint i = 0; i < cases_->size(); ++i )
+			        {
+				CaseExpr * ce = cases_->at(i);
+				if ( ce->index() )
+				        for ( uint j = 0; j < ce->index()->size(); ++j )
+						mhs = mhs_max(mhs, ce->index()->at(j)->MinimalHeaderSize(env));
+				mhs = mhs_max(mhs, ce->value()->MinimalHeaderSize(env));
+				}
+			}
+			break;
 		default:
 			// Evaluate every operand by default
 			mhs = 0;