Index: src/platform/vboot_reference/vboot_firmware/stub/utility_stub.c |
diff --git a/src/platform/vboot_reference/vboot_firmware/stub/utility_stub.c b/src/platform/vboot_reference/vboot_firmware/stub/utility_stub.c |
index 66132703ea63e57d13d2d9c364a89ed1e5679081..7a028e7bec68dc9b9b67dd45371749a4746768b5 100644 |
--- a/src/platform/vboot_reference/vboot_firmware/stub/utility_stub.c |
+++ b/src/platform/vboot_reference/vboot_firmware/stub/utility_stub.c |
@@ -96,3 +96,17 @@ const void* StatefulMemcpy_r(MemcpyState* state, const void* src, |
state->remaining_len -= len; |
return src; |
} |
+ |
+const void* StatefulMemset_r(MemcpyState* state, const uint8_t val, |
+ uint64_t len) { |
+ if (state->overrun) |
+ return NULL; |
+ if (len > state->remaining_len) { |
+ state->overrun = 1; |
+ return NULL; |
+ } |
+ Memset(state->remaining_buf, val, len); |
+ state->remaining_buf += len; |
+ state->remaining_len -= len; |
+ return state; // have to return something non-NULL |
+} |