aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEbrahim Byagowi <ebrahim@gnu.org>2018-10-19 09:06:42 +0330
committerEbrahim Byagowi <ebrahim@gnu.org>2018-10-19 09:39:36 +0330
commitbccd09d6c7baa99fdaccb8c5b3ff7e1834edd3bf (patch)
tree466cfaea70dcc65316c343e112e60fbfa23380e0
parentfbf665b307c8cc9f16f5897671bfdd8719a195b5 (diff)
downloadharfbuzz_ng-bccd09d6c7baa99fdaccb8c5b3ff7e1834edd3bf.tar.gz
Minor, tweak spaces on hb-shape-fuzzer.cc
-rw-r--r--test/fuzzing/hb-shape-fuzzer.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/fuzzing/hb-shape-fuzzer.cc b/test/fuzzing/hb-shape-fuzzer.cc
index 79f322297..b5a6c12e0 100644
--- a/test/fuzzing/hb-shape-fuzzer.cc
+++ b/test/fuzzing/hb-shape-fuzzer.cc
@@ -5,29 +5,29 @@
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
- hb_blob_t *blob = hb_blob_create((const char *)data, size,
- HB_MEMORY_MODE_READONLY, NULL, NULL);
- hb_face_t *face = hb_face_create(blob, 0);
- hb_font_t *font = hb_font_create(face);
- hb_ot_font_set_funcs(font);
- hb_font_set_scale(font, 12, 12);
+ hb_blob_t *blob = hb_blob_create ((const char *)data, size,
+ HB_MEMORY_MODE_READONLY, NULL, NULL);
+ hb_face_t *face = hb_face_create (blob, 0);
+ hb_font_t *font = hb_font_create (face);
+ hb_ot_font_set_funcs (font);
+ hb_font_set_scale (font, 12, 12);
{
const char text[] = "ABCDEXYZ123@_%&)*$!";
- hb_buffer_t *buffer = hb_buffer_create();
- hb_buffer_add_utf8(buffer, text, -1, 0, -1);
- hb_buffer_guess_segment_properties(buffer);
- hb_shape(font, buffer, NULL, 0);
- hb_buffer_destroy(buffer);
+ hb_buffer_t *buffer = hb_buffer_create ();
+ hb_buffer_add_utf8 (buffer, text, -1, 0, -1);
+ hb_buffer_guess_segment_properties (buffer);
+ hb_shape (font, buffer, NULL, 0);
+ hb_buffer_destroy (buffer);
}
uint32_t text32[16];
- if (size > sizeof(text32)) {
- memcpy(text32, data + size - sizeof(text32), sizeof(text32));
- hb_buffer_t *buffer = hb_buffer_create();
- hb_buffer_add_utf32(buffer, text32, sizeof(text32)/sizeof(text32[0]), 0, -1);
- hb_buffer_guess_segment_properties(buffer);
- hb_shape(font, buffer, NULL, 0);
+ if (size > sizeof (text32)) {
+ memcpy(text32, data + size - sizeof (text32), sizeof (text32));
+ hb_buffer_t *buffer = hb_buffer_create ();
+ hb_buffer_add_utf32 (buffer, text32, sizeof (text32) / sizeof (text32[0]), 0, -1);
+ hb_buffer_guess_segment_properties (buffer);
+ hb_shape (font, buffer, NULL, 0);
unsigned int len = hb_buffer_get_length (buffer);
hb_glyph_info_t *infos = hb_buffer_get_glyph_infos (buffer, NULL);
@@ -41,12 +41,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
hb_font_get_glyph_extents (font, info.codepoint, &extents);
}
- hb_buffer_destroy(buffer);
+ hb_buffer_destroy (buffer);
}
- hb_font_destroy(font);
- hb_face_destroy(face);
- hb_blob_destroy(blob);
+ hb_font_destroy (font);
+ hb_face_destroy (face);
+ hb_blob_destroy (blob);
return 0;
}