2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ovn-test: Fix 'test-ovn composition' crash

Without this fix, the added test will core dump.

Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Andy Zhou
2016-10-11 11:26:13 -07:00
parent 2eb98b6049
commit 42d36b586d
2 changed files with 6 additions and 2 deletions

View File

@@ -175,6 +175,10 @@ ct_state = NXM_NX_CT_STATE
]])
AT_CLEANUP
AT_SETUP([ovn -- compsition])
AT_CHECK([ovstest test-ovn composition 2], [0], [ignore])
AT_CLEANUP
AT_SETUP([ovn -- expression parser])
dnl For lines without =>, input and expected output are identical.
dnl For lines with =>, input precedes => and expected output follows =>.

View File

@@ -452,11 +452,11 @@ next_composition(unsigned int *state, int s[], int sn)
j++;
} else {
j--;
s[j] = s[j + 1];
s[j - 1]++;
if (!j) {
return 0;
}
s[j] = s[j + 1];
s[j - 1]++;
}
}
return j + 1;