提交 c85f624b 编写于 作者: E Ebrahim Byagowi

Force blob generation and memory check in hb-subset-fuzzer

上级 2e7021da
......@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "hb-subset.h"
......@@ -32,6 +33,19 @@ trySubset (hb_face_t *face,
}
hb_face_t *result = hb_subset (face, input);
{
hb_blob_t *blob = hb_face_reference_blob (result);
unsigned int length;
const char *data = hb_blob_get_data (blob, &length);
// Something not optimizable just to access all the blob data
unsigned int bytes_count = 0;
for (unsigned int i = 0; i < length; ++i)
if (data[i]) ++bytes_count;
assert (bytes_count);
hb_blob_destroy (blob);
}
hb_face_destroy (result);
hb_subset_input_destroy (input);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册