diff options
| author | Marco Vanotti <mvanotti@users.noreply.github.com> | 2019-04-03 15:48:43 -0700 |
|---|---|---|
| committer | Julia Hansbrough <flowerhack@google.com> | 2019-04-03 15:48:43 -0700 |
| commit | 8658c256227fee97c9b5d2d2ab9a2e469759993d (patch) | |
| tree | 3f3b0165fae39f04b305b61e62596da7ba2a0147 | |
| parent | ce4e53939eddbb3ee11cfa414d534ffbb9b3248b (diff) | |
executor: don't fallthrough in switches in fuchsia (#1103)
This commit modifies the common_fuchsia.h file changing the behavior of
the `syz_future_time function`. Before, the function used to have a switch
case that would fallthrough, making it always set the delta_ms to 10000.
The fix is to add a `break;` statement after each switch case.
| -rw-r--r-- | executor/common_fuchsia.h | 3 | ||||
| -rw-r--r-- | pkg/csource/generated.go | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/executor/common_fuchsia.h b/executor/common_fuchsia.h index 9749f668b..72b578012 100644 --- a/executor/common_fuchsia.h +++ b/executor/common_fuchsia.h @@ -226,10 +226,13 @@ static long syz_future_time(volatile long when) switch (when) { case 0: delta_ms = 5; + break; case 1: delta_ms = 30; + break; default: delta_ms = 10000; + break; } zx_time_t now = zx_clock_get(ZX_CLOCK_MONOTONIC); return now + delta_ms * 1000 * 1000; diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index facd7543f..0eab6956a 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -969,10 +969,13 @@ static long syz_future_time(volatile long when) switch (when) { case 0: delta_ms = 5; + break; case 1: delta_ms = 30; + break; default: delta_ms = 10000; + break; } zx_time_t now = zx_clock_get(ZX_CLOCK_MONOTONIC); return now + delta_ms * 1000 * 1000; |
