Index: src/trusted/validator_ragel/dfa_validate_32.c |
diff --git a/src/trusted/validator_ragel/dfa_validate_32.c b/src/trusted/validator_ragel/dfa_validate_32.c |
index bdbe510a5745417d872ceb43a56ff5b50317dd13..1ef111423766bc0c470ce9f2c167570b2655bb49 100644 |
--- a/src/trusted/validator_ragel/dfa_validate_32.c |
+++ b/src/trusted/validator_ragel/dfa_validate_32.c |
@@ -39,9 +39,9 @@ NaClValidationStatus ApplyDfaValidator_x86_32( |
NaClCPUFeaturesX86 *cpu_features = (NaClCPUFeaturesX86 *) f; |
enum NaClValidationStatus status = NaClValidationFailed; |
void *query = NULL; |
+ uint32_t options; |
struct StubOutCallbackData callback_data; |
- callback_data.flags = flags; |
- callback_data.did_rewrite = 0; |
+ |
UNREFERENCED_PARAMETER(guest_addr); |
if (stubout_mode) |
@@ -68,17 +68,26 @@ NaClValidationStatus ApplyDfaValidator_x86_32( |
} |
} |
+ options = 0; |
+ callback_data.flags = flags; |
+ callback_data.chunk_processed_as_a_contiguous_stream = |
+ (options & PROCESS_CHUNK_AS_A_CONTIGUOUS_STREAM) != 0; |
+ callback_data.bundle_begin_offset = (uintptr_t) data & kBundleMask; |
+ callback_data.cpu_features = cpu_features; |
+ callback_data.did_rewrite = 0; |
+ |
if (readonly_text) { |
- if (ValidateChunkIA32(data, size, 0 /*options*/, cpu_features, |
+ if (ValidateChunkIA32(data, size, options, cpu_features, |
NaClDfaProcessValidationError, |
NULL)) |
status = NaClValidationSucceeded; |
} else { |
- if (ValidateChunkIA32(data, size, 0 /*options*/, cpu_features, |
+ if (ValidateChunkIA32(data, size, options, cpu_features, |
NaClDfaStubOutUnsupportedInstruction, |
&callback_data)) |
status = NaClValidationSucceeded; |
} |
+ |
if (status != NaClValidationSucceeded && errno == ENOMEM) |
status = NaClValidationFailedOutOfMemory; |